BOOL GetTime( COleDateTime& timeDest ) const;
DWORD GetTime( CTime& timeDest ) const;
DWORD GetTime( LPSYSTEMTIME pTimeDest ) const;
Return Value
In the first version, nonzero if the time is successfully written to the COleDateTime object; otherwise 0. In the second and third versions, a DWORD value equal to the dwFlag member set in the NMDATETIMECHANGE structure. See the Remarks section below for more information.
Parameters
timeDest
In the first version, a reference to a COleDateTime object that will receive the system time information. In the second version, a reference to a CTime object that will receive the system time information.
pTimeDest
A pointer to the SYSTEMTIME structure to receive the system time information. Must not be NULL.
Remarks
This member function implements the behavior of the Win32 message DTM_GETSYSTEMTIME, as described in the Platform SDK.
In the MFC implementation of GetTime, you can use COleDateTime or CTime classes, or you can use a SYSTEMTIME structure, to store the time information.
The return value DWORD in the second and third versions, above, indicates whether or not the date and time picker control is set to the "no date" status, as indicated in the NMDATETIMECHANGE structure member dwFlags. If the value returned equals GDT_NONE, the control is set to "no date" status, and uses the DTS_SHOWNONE style. If the value returned equals GDT_VALID, the system time is successfully stored in the destination location.
CDateTimeCtrl Overview | Class Members | Hierarchy Chart
See Also CDateTimeCtrl::SetTime