CMFCToolBarDateTimeCtrl::CMFCToolBarDateTimeCtrl
Creates and initializes a CMFCToolBarDateTimeCtrl Class object.
CMFCToolBarDateTimeCtrl(
UINT uiID,
int iImage,
DWORD dwStyle=0,
int iWidth=0
);
Parameters
[in] uiID
The control ID.[in] iImage
The index of the image in the toolbar's CMFCToolBarImages object.[in] dwStyle
The style of the CMFCToolBarDateTimeCtrlImpl window that is created when a user clicks the button.[in] iWidth
The width of the control, in pixels.
Remarks
This object is initialized to the system date and time. The window style of the internal CMFCToolBarDateTimeCtrlImpl object includes the dwStyle parameter and the WS_CHILD and WS_VISIBLE styles. You cannot change these styles by using CMFCToolBarDateTimeCtrl::SetStyle. Use SetStyle to change the style of the CMFCToolBarDateTimeCtrl control.
Example
The following example demonstrates how to construct an object of the CMFCToolBarDateTimeCtrl class. This code snippet is part of the ToolbarDateTimePicker Sample: MFC Toolbar Date Time Picker Application.
CMFCToolBarDateTimeCtrl dateButton (ID_DATE,
GetCmdMgr ()->GetCmdImage (ID_DATE, FALSE));
Requirements
Header: afxtoolbardatetimectrl.h