comctl32/monthcal: Months popup menu should be placed at current pointer position.

This commit is contained in:
Nikolay Sivov 2009-09-28 22:13:56 +04:00 committed by Alexandre Julliard
parent bce1cebdd4
commit 30010f44d5

View file

@ -1453,8 +1453,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+i, buf, countof(buf));
AppendMenuW(hMenu, MF_STRING|MF_ENABLED, i + 1, buf);
}
menupoint.x = infoPtr->titlemonth.right;
menupoint.y = infoPtr->titlemonth.bottom;
menupoint.x = ht.pt.x;
menupoint.y = ht.pt.y;
ClientToScreen(infoPtr->hwndSelf, &menupoint);
i = TrackPopupMenu(hMenu,TPM_LEFTALIGN | TPM_NONOTIFY | TPM_RIGHTBUTTON | TPM_RETURNCMD,
menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL);
@ -1464,6 +1464,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
infoPtr->curSel.wMonth = i;
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
}
return 0;
}
case MCHT_TITLEYEAR:
{