The Calendar Control

The MSCal.ocx control is a popular Microsoft ActiveX Calendar control that's probably already installed and registered on your computer. If it isn't there, don't worry. It's on the CD-ROM that comes with this book.

Figure 8-1 shows the Calendar control inside a modal dialog.

click to view at full size.

Figure 8-1. The Calendar control in use.

The Calendar control comes with a help file that lists the control's properties, methods, and events shown here.

PropertiesMethodsEvents
BackColorAboutBoxAfterUpdate
DayNextDayBeforeUpdate
DayFontNextMonthClick
DayFontColorNextWeekDblClick
DayLengthNextYearKeyDown
FirstDayPreviousDayKeyPress
GridCellEffectPreviousMonthKeyUp
GridFontPreviousWeekNewMonth
GridFontColorPreviousYearNewYear
GridLinesColorRefresh 
MonthToday 
MonthLength  
ShowDateSelectors  
ShowDays  
ShowHorizontalGridlines  
ShowTitle  
ShowVerticalGridlines  
TitleFont  
TitleFontColor  
Value  
ValueIsNull  
Year  

You'll be using the BackColor, Day, Month, Year, and Value properties in the EX08A example later in this chapter. BackColor is an unsigned long, but it is used as an OLE_COLOR, which is almost the same as a COLORREF. Day, Month, and Year are short integers. Value's type is the special type VARIANT, which is described in Chapter 25. It holds the entire date as a 64-bit value.

Each of the properties, methods, and events listed above has a corresponding integer identifier. Information about the names, types, parameter sequences, and integer IDs is stored inside the control and is accessible to ClassWizard at container design time.



Programming Microsoft Visual C++
Programming Microsoft Visual C++
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net