Nikolay Sivov : comctl32/monthcal: Properly handle Goto Today popup menu ( on RButton).
Alexandre Julliard
julliard at winehq.org
Mon Sep 28 11:54:38 CDT 2009
Module: wine
Branch: master
Commit: 818aab58f5b4398f817abedd8c67c85e06b97a47
URL: http://source.winehq.org/git/wine.git/?a=commit;h=818aab58f5b4398f817abedd8c67c85e06b97a47
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Sat Sep 26 15:33:47 2009 +0400
comctl32/monthcal: Properly handle Goto Today popup menu (on RButton).
---
dlls/comctl32/monthcal.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 498c84f..9cee5fc 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -1294,22 +1294,24 @@ MONTHCAL_RButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
WCHAR buf[32];
hMenu = CreatePopupMenu();
- if (!LoadStringW(COMCTL32_hModule,IDM_GOTODAY,buf,countof(buf)))
- {
+ if (!LoadStringW(COMCTL32_hModule, IDM_GOTODAY, buf, countof(buf)))
+ {
WARN("Can't load resource\n");
strcpyW(buf, todayW);
- }
- AppendMenuW(hMenu, MF_STRING|MF_ENABLED,1, buf);
- menupoint.x=(short)LOWORD(lParam);
- menupoint.y=(short)HIWORD(lParam);
+ }
+ AppendMenuW(hMenu, MF_STRING|MF_ENABLED, 1, buf);
+ menupoint.x = (short)LOWORD(lParam);
+ menupoint.y = (short)HIWORD(lParam);
ClientToScreen(infoPtr->hwndSelf, &menupoint);
- if( TrackPopupMenu(hMenu,TPM_RIGHTBUTTON| TPM_NONOTIFY|TPM_RETURNCMD,
+ if( TrackPopupMenu(hMenu, TPM_RIGHTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD,
menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL))
- {
- infoPtr->curSel.wMonth = infoPtr->todaysDate.wMonth;
- infoPtr->curSel.wYear = infoPtr->todaysDate.wYear;
+ {
+ infoPtr->curSel = infoPtr->todaysDate;
+ infoPtr->minSel = infoPtr->todaysDate;
+ infoPtr->maxSel = infoPtr->todaysDate;
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
- }
+ }
+
return 0;
}
More information about the wine-cvs
mailing list