Rediger

Del via


MCM_HITTEST message

Determines which portion of a month calendar control is at a given point on the screen. You can send this message explicitly or by using the MonthCal_HitTest macro.

Parameters

wParam

Must be zero.

lParam

Pointer to an MCHITTESTINFO structure. Upon sending the message, the cbSize member must be set to the size of the MCHITTESTINFO structure, and pt must be set to the point you want to hit test.

Return value

Sets values in members of the

Return code Description
MCHT_CALENDAR
The given point was within the calendar.
MCHT_CALENDARBK
The given point was in the calendar's background.
MCHT_CALENDARDATE
The given point was on a particular date within the calendar. The SYSTEMTIME structure at lParam->st is set to the date at the given point.
MCHT_CALENDARDATENEXT
The given point was over a date from the next month (partially displayed at the end of the currently displayed month). If the user clicks here, the month calendar will scroll its display to the next month or set of months.
MCHT_CALENDARDATEPREV
The given point was over a date from the previous month (partially displayed at the end of the currently displayed month). If the user clicks here, the month calendar will scroll its display to the previous month or set of months.
MCHT_CALENDARDAY
The given point was over a day abbreviation ("Fri", for example). The SYSTEMTIME structure at lParam->st is set to the corresponding date in the top row.
MCHT_CALENDARWEEKNUM
The given point was over a week number (MCS_WEEKNUMBERS style only). The SYSTEMTIME structure at lParam->st is set to the corresponding date in the leftmost column.
MCHT_NEXT
The given point is in an area that will cause the month calendar to scroll its display to the next month or set of months. This flag is used to modify other hit test flags.
MCHT_NOWHERE
The given point was not on the month calendar control, or it was in an inactive portion of the control.
MCHT_PREV
The given point is in an area that will cause the month calendar to scroll its display to the previous month or set of months. This flag is used to modify other hit test flags.
MCHT_TITLE
The given point was over a month's title.
MCHT_TITLEBK
The given point was over the background of a month's title.
MCHT_TITLEBTNNEXT
The given point was over the button at the top right corner of the control. If the user clicks here, the month calendar will scroll its display to the next month or set of months.
MCHT_TITLEBTNPREV
The given point was over the button at the top left corner of the control. If the user clicks here, the month calendar will scroll its display to the previous month or set of months.
MCHT_TITLEMONTH
The given point was in a month's title bar, over a month name.
MCHT_TITLEYEAR
The given point was in a month's title bar, over the year value.
MCHT_TODAYLINK
The given point was on the "today" link at the bottom of the month calendar control.
The uHit member of the MCHITTESTINFO structure at lParam will equal the return value.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h