CDateTime Class |
Description
The CDateTime class adds support for the date and time picker control. A date and time picker (DTP) control provides a simple and intuitive interface through which to exchange date and time information with a user.
Refer to the documentation that ships with the Microsoft Windows Software Development Kit for more information on the use of date and time picker controls.
CDateTime Members
Construction |
CDateTime();Constructs the date and time picker control.
COLORREF GetMonthCalColor(int iColor) const;Gets the color for a given portion of the month calendar within a date and time picker (DTP) control.
HWND GetMonthCalCtrl() const;Gets the handle to a date and time picker's (DTP) child month calendar control.
CFont* GetMonthCalFont() const;Gets the font that the date and time picker (DTP) control's child month calendar control is currently using.
DWORD GetRange(LPSYSTEMTIME lpSysTimeArray) const;Gets the current minimum and maximum allowable system times for the date and time picker (DTP) control.
DWORD GetTime(LPSYSTEMTIME pTimeDest) const;Gets the currently selected time from a date and time picker (DTP) control and places it in a specified
COLORREF SetMonthCalColor(int iColor, COLORREF ref);Sets the color for a given portion of the month calendar within a date and time picker (DTP) control.
BOOL SetFormat(LPCTSTR pstrFormat);Sets the display of a date and time picker (DTP) control based on a given format string.
void SetMonthCalFont(HFONT hFont, BOOL bRedraw = TRUE);Sets the font to be used by the date and time picker (DTP) control's child month calendar control.
BOOL SetRange(DWORD flags, LPSYSTEMTIME lpSysTimeArray);Sets the minimum and maximum allowable system times for the date and time picker (DTP) control.
BOOL SetTime(DWORD flag, LPSYSTEMTIME pTimeNew = NULL);Sets the date and time picker (DTP) control to a given date and time.
virtual void PreRegisterClass(WNDCLASS &wc);Sets a date and time picker (DTP) control to a given date and time.
Base class Members
For base class members, refer to the members of CWnd.
Remarks
Date and time picker (DTP) controls have several
Summary Information
Header file | controls.h |
Win32/64 support | Yes |
WinCE support | Yes |
Library required | Comctl32.lib |