BCGControlBar Pro for MFC
CBCGPDateTimeCtrl

Detailed Description

The CBCGPDateTimeCtrl class encapsulates the functionality of the date and time picker control. The date and time picker control provides a simple interface to exchange date and time information with a user. This interface contains fields displaying a part of the date and time information stored in the control. The user can change the information stored in the control by changing the content of the string in a given field. The user can move from field to field using the mouse or the keyboard. User can enable/disable input by checkbox that is a part of control.

You can customize the date and time picker control by applying a variety of styles to the object after you have created it calling method SetState().

The CBCGPDateTimeCtrl object notifies its parent about the date and time changing by WM_COMMAND | BN_CLICKED notification. The parent may retrieve the current date and time by calling GetDate() method.

The date and time picker control also uses WM_NOTIFY notifications.

See also
CBCGPButton

Inherits CButton.

Inherited by CBCGPGridDateTimeCtrl.

Public Member Functions

 EnableCalendarTodayButtonEnables or disables "Today" button in the drop-down calendar.
 
 EnableVisualManagerStyleEnables the visual manager style.
 
 GetBackgroundColorReturns background color of the date/time picker.
 
 GetDateReturns date.
 
 GetEmptyDateLabelGets empty date label.
 
 GetMaxWeekDayCharactersGets maximum week day characters.
 
 GetStateReturns the current state(style) of the control.
 
 GetTextColorReturns text color of the date/time picker.
 
 HasFlatButtonsTells whether the control has flat buttons.
 
 IsCalendarTodayButtonEnabledTells whether a drop-down calendar has "Today" button or not.
 
 IsReadOnlyTells whether the control has read-only mode.
 
 IsTouchModeTells whether a control has a touch mode.
 
 IsVisualManagerStyleTells whether a window uses visual manager style.
 
 SetBackgroundColorSets custom background color to the date/time picker.
 
 SetDateSets date in the control.
 
 SetDateSets date in the control.
 
 SetEmptyDateLabelSets empty date label.
 
 SetFirstDayOfWeekSets starting week day for pop-up calendar window.
 
 SetFlatButtonsSpecifies whether the control has flat buttons.
 
 SetMaxWeekDayCharactersSets maximum week day characters.
 
 SetReadOnlySets read-only mode.
 
 SetRelatedSet related date picker.
 
 SetStateSet the state of control parts.
 
 SetTextColorSets custom text color to the date/time picker.
 
 SetTouchModeEnables/disables control touch mode.
 

Public Attributes

 m_maxYear2DigitsSpecifies the years range for 2 digits of the year typing mode (CBCGPDateTimeCtrl::m_type2DigitsInYear is TRUE).
 
 m_type2DigitsInYearSpecifies whether user can type 2 or 4 digits of the year. If this member is TRUE, the year will be in [CBCGPDateTimeCtrl::m_maxYear2Digits – 100 : CBCGPDateTimeCtrl::m_maxYear2Digits] range.