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.
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.
Properties | Methods | Events |
BackColor | AboutBox | AfterUpdate |
Day | NextDay | BeforeUpdate |
DayFont | NextMonth | Click |
DayFontColor | NextWeek | DblClick |
DayLength | NextYear | KeyDown |
FirstDay | PreviousDay | KeyPress |
GridCellEffect | PreviousMonth | KeyUp |
GridFont | PreviousWeek | NewMonth |
GridFontColor | PreviousYear | NewYear |
GridLinesColor | Refresh | |
Month | Today | |
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.