Partager via


MCM_HITTEST (Compact 2013)

3/28/2014

This message determines which portion of a month calendar control is at a specified point on the screen.

Syntax

MCM_HITTEST wParam = 0;
    lParam = (LPARAM)(PMCHITTESTINFO) pMCHitTest;

Parameters

  • wParam
    Not used.
  • pMCHitTest
    Pointer to an MCHITTESTINFO structure. Upon sending the message, the cbSize member must equal sizeof(MCHITTESTINFO), and pt must be set to the point you want to hit test.

Return Value

Sets values in members of the MCHITTESTINFO structure at pMCHitTest and returns a DWORD value that is one of the following values:

  • MCHT_CALENDAR
    The specified point was within the calendar.
  • 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 specified 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 (The MCS_WEEKNUMBERS style only.) The SYSTEMTIME structure at lpMCHitTest->st is set to the corresponding date in the leftmost column.
  • MCHT_NEXT
    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_NOWHERE
    The specified point was either not on the month calendar control, or in an inactive portion of the control.
  • MCHT_PREV
    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_TITLE
    The specified point was over a month's title.
  • 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 the 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.
  • MCHT_TODAYLINK
    The specified point was on the today link at the bottom of the month calendar control.

Remarks

The uHit member of the MCHITTESTINFO structure at pMCHitTest will equal the return value.

Related macro MonthCal_HitTest

Requirements

Header

commctrl.h

See Also

Reference

Month Calendar Controls Messages
MCHITTESTINFO

Other Resources

SYSTEMTIME