diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-16 12:56:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-16 12:56:51 +0300 |
commit | 9b57db9ad61503ebf96a1b1f9a9e3ce687d242f1 (patch) | |
tree | f210f84619dbed149ed65248f420934abb4f1505 /src/mir_app | |
parent | 12d07d0386488c5aeec88e11bc465e67a021db4e (diff) |
nope.. this code must be executed each time we create a menu
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/clui.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 6b170e6edc..6166d78832 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -98,6 +98,14 @@ static int CluiLangpackChanged(WPARAM, LPARAM) g_clistApi.hMenuMain = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_CLISTMENU));
TranslateMenu(g_clistApi.hMenuMain);
+ // make menu bar owner-drawn and set it on
+ MENUITEMINFO mii;
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_TYPE | MIIM_DATA;
+ mii.dwItemData = MENU_MIRANDAMENU;
+ mii.fType = MFT_OWNERDRAW;
+ SetMenuItemInfo(g_clistApi.hMenuMain, 0, TRUE, &mii);
+
if (GetMenu(g_clistApi.hwndContactList))
SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain);
return 0;
@@ -321,13 +329,6 @@ int LoadCLUIModule(void) HookEvent(ME_LANGPACK_CHANGED, CluiLangpackChanged);
CluiLangpackChanged(0, 0);
- // make menu bar owner-drawn and set it on
- MENUITEMINFO mii;
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_TYPE | MIIM_DATA;
- mii.dwItemData = MENU_MIRANDAMENU;
- mii.fType = MFT_OWNERDRAW;
- SetMenuItemInfo(g_clistApi.hMenuMain, 0, TRUE, &mii);
SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain);
g_clistApi.pfnOnCreateClc();
|