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 |
---|---|
|
The given point was within the calendar. |
|
The given point was in the calendar's background. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
The given point was not on the month calendar control, or it was in an inactive portion of the control. |
|
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. |
|
The given point was over a month's title. |
|
The given point was over the background of a month's title. |
|
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. |
|
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. |
|
The given point was in a month's title bar, over a month name. |
|
The given point was in a month's title bar, over the year value. |
|
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 |
|