COXMonthCalCtrl
Copyright © The Code Project 1997 - 1998, All Rights Reserved

include <OXMonthCalCtrl.h>

A COXMonthCalCtrl object encapsulates the functionality of a month calendar control. The month calendar control provides the user with a simple calendar interface, from which the user can select a date. The user can change the display by: 
•	Scrolling backward and forward, from month to month. 
•	Clicking the Today text to display the current day (if the MCS_NOTODAY style is not used). 
•	Picking a month or a year from a pop-up menu. 
You can customize the month calendar control by applying a variety of styles to the object when you create it. 
The month calendar control can display more than one month, and it can indicate special days (such as holidays) by bolding the date.

Using COXMonthCalCtrl
The month calendar control (COXMonthCalCtrl) implements a calendar-like user interface. This provides the user with a very intuitive and recognizable method of entering or selecting a date. The control also provides the application with the means to obtain and set the date information in the control using existing data types. By default, the month calendar control displays the current day and month. However, the user is able to scroll to the previous and next months and select a specific month and/or year.

Creating the Month Calendar Control
How the month calendar control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window.

To use COXMonthCalCtrl directly in a dialog box:
Visual C++ v6.0:
In the dialog editor, add a Month Calendar Control to your dialog template resource. Specify its control ID. Specify any styles required, using the Properties dialog box of the month calendar control. Use ClassWizard to add a member variable of type COXMonthCalCtrl with the Control property. You can use this member to call COXMonthCalCtrl member functions. Use ClassWizard to map handler functions in the dialog class for any month calendar control notification messages you need to handle. In OnInitDialog, set any additional styles for the COXMonthCalCtrl object. 
Visual C++ v5.0:
In the dialog editor, add a Static Control to your dialog template resource (it will be a placeholder for the month calendar control). Specify its control ID. In OnInitDialog, you can use next code to replace Static Control on our calendar control:
	CWnd *pFrame=GetDlgItem(IDC_MONTHCAL); CRect rcWnd; pFrame->GetWindowRect(rcWnd); pFrame->DestroyWindow(); //pFrame was just a placeholder anyway. ScreenToClient(rcWnd); m_ctlMonthCal.Create(WS_CHILD|WS_VISIBLE,rcWnd.TopLeft(),this,IDC_MONTHCAL);	

To use COXMonthCalCtrl in a nondialog window 
Define the control in the view or window class. Call the control's Create member function, possibly in OnInitialUpdate, possibly as early as the parent window's OnCreate handler function (if you're subclassing the control). Set the styles for the control.