summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-17 21:43:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-17 21:43:29 +0000
commit09af1fc3d99c95a3f9a6f4401395c00082927243 (patch)
treed509c52e1292f09c96ae01b38f10f2ea02ebd8db /src/modules
parentbcf4c54d33c7f735ce325dd8183afc0f1a2d0493 (diff)
no need to send WM_DESTROY to a window being unsubclassed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6117 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/clist/clisttray.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp
index 4bd8d68c34..97a0d9d08d 100644
--- a/src/modules/clist/clisttray.cpp
+++ b/src/modules/clist/clisttray.cpp
@@ -738,13 +738,11 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
cli.pfnShowHide(0, 0);
}
else if (msg->lParam == WM_RBUTTONUP) {
- MENUITEMINFO mi;
- POINT pt;
HMENU hMainMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
HMENU hMenu = GetSubMenu(hMainMenu, 0);
TranslateMenu(hMenu);
- ZeroMemory(&mi, sizeof(mi));
+ MENUITEMINFO mi = { 0 };
mi.cbSize = MENUITEMINFO_V4_SIZE;
mi.fMask = MIIM_SUBMENU | MIIM_TYPE;
mi.fType = MFT_STRING;
@@ -758,6 +756,8 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
SetForegroundWindow(msg->hwnd);
SetFocus(msg->hwnd);
+
+ POINT pt;
GetCursorPos(&pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN, pt.x, pt.y, 0, msg->hwnd, NULL);