Dela via


CMFCToolBarDateTimeCtrl::GetTime

Gets the selected time from the associated date and time picker control and puts it in a specified SYSTEMTIME structure

BOOL GetTime(
   COleDateTime& timeDest 
) const;
DWORD GetTime(
   CTime& timeDest 
) const;
DWORD GetTime(
   LPSYSTEMTIME pTimeDest 
) const;

Parameters

  • [out] timeDest
    In the first overload, a COleDateTime Class object that will receive the system time information. In the second overload, a CTime object that will receive the system time information.

  • [out] pTimeDest
    A pointer to the SYSTEMTIME structure to receive the system time information. Must not be NULL.

Return Value

In the first overload, nonzero if the time is successfully written to the COleDateTime Class object; otherwise 0. In the second and third overloads, the return value is a DWORD that is equal to the dwFlag member that was set in the NMDATETIMECHANGE structure.

Remarks

The method sets the NMDATETIMECHANGE structure member dwFlags to indicate whether the date and time picker is set to a date and time. If the value 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.

Requirements

Header: afxtoolbardatetimectrl.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCToolBarDateTimeCtrl Class