MCHITTESTINFO

This structure 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.

At a Glance

Header file: Commctrl.h
Windows CE versions: 2.0 and later

Syntax

typedef struct {
UINT cbSize;
POINT pt;
UINT uHit;
SYSTEMTIME st;
}
MCHITTESTINFO, *PMCHITTESTINFO;

Members

cbSize

Size of this structure, in bytes.

pt

POINT structure that contains information about the point to be hit-tested.

uHit

Output member that receives a bit flag representing the result of the hit-test operation. It is one of the following values:

Value Description
MCHT_CALENDARBK The specified point was in the calendar’s background.
MCHT_CALENDARDATE The specified point was on a particular date within the calendar. The SYSTEMTIME structure at lpMCHitTest->st is set to the date at the given point.
MCHT_CALENDARDATENEXT The specified 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 specified 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 specified point was over a day abbreviation (“Fri”). The SYSTEMTIME structure at lpMCHitTest->st is set to the corresponding date in the top row.
MCHT_CALENDARWEEKNUM The specified point was over a week number (MCS_WEEKNUMBERS only). The SYSTEMTIME structure at lpMCHitTest->st is set to the corresponding date in the leftmost column.
MCHT_NOWHERE The specified point was either not on the month calendar control, or in an inactive portion of the control.
MCHT_TITLEBK The specified point was over the background of a month’s title.
MCHT_TITLEBTNNEXT The specified 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 specified 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 specified point was in a month’s title bar, over a month name.
MCHT_TITLEYEAR The specified point was in a month’s title bar, over the year value.

st

SYSTEMTIME structure that receives date and time information specific to the location that was hit-tested.