MCHITTESTINFO structure (commctrl.h)
Carries information specific to hit-testing points for a month calendar control. This structure is used with the MCM_HITTEST message and the corresponding MonthCal_HitTest macro.
Syntax
typedef struct {
UINT cbSize;
POINT pt;
UINT uHit;
SYSTEMTIME st;
RECT rc;
int iOffset;
int iRow;
int iCol;
} MCHITTESTINFO, *PMCHITTESTINFO;
Members
cbSize
Type: UINT
The size of this structure, in bytes.
pt
Type: POINT
Point to be hit-tested.
uHit
Type: UINT
Output member that receives a bit flag representing the result of the hit-test operation. This value will be one of the following:
Value | Meaning |
---|---|
|
The given point was in the calendar's background. |
|
The given point is outside of any calendar but within the calendar controls RECT. |
|
The given point was on a particular date within the calendar. The SYSTEMTIME structure at lpMCHitTest>st is set to the date at the given point. |
|
The given point was over the minimum date(s) in the calendar. |
|
The given point was over the maximum date(s) in the calendar. |
|
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 lpMCHitTest>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 lpMCHitTest>st is set to the corresponding date in the leftmost column. |
|
The given point was not on the month calendar control, or it was in an inactive portion of the control. |
|
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. |
st
Type: SYSTEMTIME
Receives date and time information specific to the location that was hit-tested.
rc
Type: RECT
Hit-tested location.
iOffset
Type: int
When displaying more than one calendar, this is the offset of the calendar at the hit-tested point (zero-based).
iRow
Type: int
The row number for the calendar grid that the given hit point was over. Example: If you hit-tested the 8th of a month, which is in the second week of the month, iRow will be one since the index of the row is zero-based row index.
iCol
Type: int
The column number for the calendar grid that the given point was over. For example, if your week starts on Sunday and the 1st of the month is Friday, hit testing the 1st will return five (5) for iCol, since Friday is in the fifth column from the beginning of the row, using a zero-based column index.
Remarks
Columns and rows in this control use a zero-based index system, that is, the first column or row has an index of zero.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | commctrl.h |