DateTime_GetSystemtime macro

Gets the currently selected time from a date and time picker (DTP) control and places it in a specified SYSTEMTIME structure. You can use this macro, or send the DTM_GETSYSTEMTIME message explicitly.

Syntax


DWORD DateTime_GetSystemtime(
   HWND         hwndDP,
   LPSYSTEMTIME lpSysTime
);

Parameters

hwndDP

Type: HWND

A handle to a DTP control.

lpSysTime

Type: LPSYSTEMTIME

A pointer to a SYSTEMTIME structure. If DTM_GETSYSTEMTIME returns GDT_VALID, this structure will contain the currently selected time. Otherwise, it will not contain valid information. This parameter must be a valid pointer; it cannot be NULL.

Return value

Returns GDT_VALID if the time information was successfully placed in lpSysTime. Returns GDT_NONE if the control was set to the DTS_SHOWNONE style and the control check box was not selected. Returns GDT_ERROR if an error occurs.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: