WinXAddCalendar


WinXAddCalendar (hParent, @monthsX, @monthsY, id)

Creates a new calendar control

Parameter Description
hParent The handle to the window to add the calendar control to
@monthsX The number of months to display in the x direction, receives the required width of the control
@monthsY The number of months to display in the y direciton, receives the required height of the control
id The unique id constant for this control

Returns

The handle to the new control or 0 on fail

Remarks

Calendar controls don't resize nicely, so they should be given a fixed size. The monthsX and monthsY parameters can be used to work out an appropriate size.

Examples

$$ID_CALENDAR = 100

...

' Create a calendar control which displays 3 months vertically
hCal = WinXAddCalendar (#hMain, @monthsX, @monthsY, $$ID_CALENDAR)
MoveWindow (hCal, 0, 0, monthsX, monthsY, $$TRUE)

Related Links

Calendar Controls
WinXCalendar_SetSelection
WinXCalendar_GetSelection