The DDX_DateTimeCtrl function manages the transfer of date and/or time data between a date and time picker control (CDateTimeCtrl) in a dialog box or form view object and either a CTime or a COleDateTime data member of the dialog box or form view object.
void AFXAPI DDX_DateTimeCtrl( CDataExchange* pDX, int nIDC, CTime& value ); void AFXAPI DDX_DateTimeCtrl( CDataExchange* pDX, int nIDC, COleDateTime& value ); void AFXAPI DDX_DateTimeCtrl( CDataExchange* pDX, int nIDC, CString& value );
- A pointer to a CDataExchange object. The framework supplies this object to establish the context of the data exchange, including its direction. You don't need to delete this object.
- The resource ID of the date and time picker control associated with the member variable.
- In the first two versions, a reference to a CTime or COleDateTime member variable, dialog box, form view, or control view object with which data is exchanged. In the third version, a reference to a CString data member control view object.
When DDX_DateTimeCtrl is called, value is set to the current state of the date and time picker control, or the control is set to value, depending on the direction of the exchange.
In the third version above, DDX_DateTimeCtrl manages the transfer of CString data between a date time control and a CString data member of the control view object. The string is formatted using the current locale's rules for formatting dates and times.
For more information about DDX, see Dialog Data Exchange and Validation.