Share via


MonthCal_HitTest (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

DWORD MonthCal_HitTest(
  HWND hwndMC, 
  PMCHITTESTINFO pMCHitTest 
);

Parameters

  • hwndMC
    Handle to a month calendar control.
  • pMCHitTest
    Pointer to an MCHITTESTINFO structure. Upon sending the macro, 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 one of the following DWORD values:

  • 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_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.

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

Remarks

Related message: MCM_HITTEST

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 2.0 and later

See Also

Reference

Month Calendar Controls Macros
MCHITTESTINFO