comctl32/monthcal: Months popup menu should be placed at current pointer position.
This commit is contained in:
parent
bce1cebdd4
commit
30010f44d5
|
@ -1453,8 +1453,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+i, buf, countof(buf));
|
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+i, buf, countof(buf));
|
||||||
AppendMenuW(hMenu, MF_STRING|MF_ENABLED, i + 1, buf);
|
AppendMenuW(hMenu, MF_STRING|MF_ENABLED, i + 1, buf);
|
||||||
}
|
}
|
||||||
menupoint.x = infoPtr->titlemonth.right;
|
menupoint.x = ht.pt.x;
|
||||||
menupoint.y = infoPtr->titlemonth.bottom;
|
menupoint.y = ht.pt.y;
|
||||||
ClientToScreen(infoPtr->hwndSelf, &menupoint);
|
ClientToScreen(infoPtr->hwndSelf, &menupoint);
|
||||||
i = TrackPopupMenu(hMenu,TPM_LEFTALIGN | TPM_NONOTIFY | TPM_RIGHTBUTTON | TPM_RETURNCMD,
|
i = TrackPopupMenu(hMenu,TPM_LEFTALIGN | TPM_NONOTIFY | TPM_RIGHTBUTTON | TPM_RETURNCMD,
|
||||||
menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL);
|
menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL);
|
||||||
|
@ -1464,6 +1464,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
infoPtr->curSel.wMonth = i;
|
infoPtr->curSel.wMonth = i;
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
case MCHT_TITLEYEAR:
|
case MCHT_TITLEYEAR:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue