From 1ac5dafa951f57dfca5cf0dd6e7d2eeeea2f6772 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 3 Jul 2015 08:43:58 +0000 Subject: - 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 --- plugins/Clist_modern/src/modern_clui.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'plugins/Clist_modern/src/modern_clui.cpp') 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 @@ -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; } -- cgit v1.2.3