DateTime_SetSystemtime macro (commctrl.h)

Sets a date and time picker (DTP) control to a given date and time. You can use this macro or send the DTM_SETSYSTEMTIME message explicitly.

Syntax

void DateTime_SetSystemtime(
   hdp,
   gd,
   pst
);

Parameters

hdp

Type: HWND

A handle to a DTP control.

gd

Type: DWORD

A value that specifies the action that should be performed. This should be set to one of the following values.

Value Meaning
GDT_VALID
Set the DTP control according to the data within the SYSTEMTIME structure pointed to by lpSysTime.
GDT_NONE
Set the DTP control to "no date" and clear its check box. When this flag is specified, lpSysTime is ignored. This flag applies only to DTP controls that are set to the DTS_SHOWNONE style.

pst

Type: LPSYSTEMTIME

A pointer to a SYSTEMTIME structure that contains the system time information by which to set the DTP control.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h