description | title | ms.date | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|
Learn more about: Creating the Month Calendar Control |
Creating the Month Calendar Control |
11/04/2016 |
|
185cc642-85e9-4365-8a4c-d90b75b010f7 |
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.
-
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 the Add Member Variable Wizard to add a member variable of type CMonthCalCtrl with the Control property. You can use this member to call
CMonthCalCtrl
member functions. -
Use the Class Wizard to map handler functions in the dialog class for any month calendar control notification messages you need to handle (see Mapping Messages to Functions).
-
In OnInitDialog, set any additional styles for the
CMonthCalCtrl
object.
-
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.