diff options
author | George Hazan <george.hazan@gmail.com> | 2015-07-03 08:43:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-07-03 08:43:58 +0000 |
commit | 1ac5dafa951f57dfca5cf0dd6e7d2eeeea2f6772 (patch) | |
tree | 7f7adfefbd54d284072b98dc18bbd2bb26a165d4 /plugins/Clist_modern/src/modern_clui.cpp | |
parent | 6c1c4268578dcd59fc78f2ec8336bee991213a93 (diff) |
- IDR_CONTEXT resource removed from all clists;
- all menu control rewritten using Menu_* functions, thus making group & tray menu customizable in StdClist & Clist_Nicer;
- major gdi resource leak fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@14483 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clui.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 9a73b66c63..f320d043e8 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -56,7 +56,6 @@ int MetaStatusChanged(WPARAM, LPARAM); HRESULT(WINAPI *g_proc_DWMEnableBlurBehindWindow)(HWND hWnd, DWM_BLURBEHIND *pBlurBehind);
BOOL CALLBACK ProcessCLUIFrameInternalMsg(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& result);
-void DestroyTrayMenu(HMENU hMenu);
// new sources
#include <crtdbg.h>
@@ -221,11 +220,9 @@ INT_PTR CLUI::Service_ShowMainMenu(WPARAM, LPARAM) INT_PTR CLUI::Service_ShowStatusMenu(WPARAM, LPARAM)
{
- HMENU hMenu = (HMENU)Menu_GetStatusMenu();
-
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
@@ -255,7 +252,7 @@ HRESULT CLUI::CreateCluiFrames() mii.hSubMenu = Menu_GetMainMenu();
SetMenuItemInfo(g_hMenuMain, 0, TRUE, &mii);
- mii.hSubMenu = (HMENU)Menu_GetStatusMenu();
+ mii.hSubMenu = Menu_GetStatusMenu();
SetMenuItemInfo(g_hMenuMain, 1, TRUE, &mii);
CreateCLCWindow(pcli->hwndContactList);
@@ -284,9 +281,6 @@ m_hDwmapiDll(NULL) CLUIServices_LoadModule();
- // Call InitGroup menus before
- GroupMenus_Init();
-
CreateServiceFunction(MS_CLUI_SHOWMAINMENU, Service_ShowMainMenu);
CreateServiceFunction(MS_CLUI_SHOWSTATUSMENU, Service_ShowStatusMenu);
@@ -2432,7 +2426,7 @@ LRESULT CLUI::OnContextMenu(UINT, WPARAM, LPARAM lParam) if (PtInRect(&rc, pt)) {
HMENU hMenu = Menu_BuildGroupMenu();
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, m_hWnd, NULL);
- DestroyTrayMenu(hMenu);
+ Menu_DestroyNestedMenu(hMenu);
}
return FALSE;
}
|