Share via


MonthCal_SetDayState

This macro sets the display for days in all months that are currently visible within a month calendar control.

BOOL MonthCal_SetDayState(HWND hwndMC, 
INT iMonths, 
LPMONTHDAYSTATE lpDayStateArray );

Parameters

  • hwndMC
    Handle to a month calendar control.
  • iMonths
    INT value that indicates how many elements are in the array that lpDayStateArray points to.
  • lpDayStateArray
    Long pointer to an array of MONTHDAYSTATE values that define how the month calendar control will draw each day in its display.

Return Values

Nonzero if successful. If the macro fails, it returns zero.

Remarks

The array at lpDayStateArray must contain as many elements as the value returned by the following macro:

MonthCal_GetMonthRange(hwndMC, GMR_DAYSTATE, NULL); 

The preceding macro returns the total number of months that are in complete or partial view within the month calendars display.

Keep in mind that the array at lpDayStateArray must contain MONTHDAYSTATE values that correspond with all months currently in the controls display, in chronological order. This includes the two months only partially displayed before the first month and after the last month.

Related message: MCM_SETDAYSTATE

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Commctrl.h   Commctrl.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.