DateTime_SetSystemtime

DateTime_SetSystemtime macro

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


BOOL DateTime_SetSystemtime(
   HWND         hwndDT,
   DWORD        flag,
   LPSYSTEMTIME lpSysTime
);

Parameters

hwndDT

Type: HWND

A handle to a DTP control.

flag

Type: DWORD

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

ValueMeaning
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.

 

lpSysTime

Type: LPSYSTEMTIME

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

Return value

Returns nonzero if successful, or zero otherwise.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2016 Microsoft