diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
commit | 30707c980d1560b358dbf2671a4d2a26a1e8173c (patch) | |
tree | 74aee5adaaac976e1398274ca64c5461a60f1feb /plugins/Dbx_mmap_SA | |
parent | 335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff) |
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mmap_SA')
-rw-r--r-- | plugins/Dbx_mmap_SA/src/dialogs.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/plugins/Dbx_mmap_SA/src/dialogs.cpp b/plugins/Dbx_mmap_SA/src/dialogs.cpp index c54acaa597..6a53bcbf4b 100644 --- a/plugins/Dbx_mmap_SA/src/dialogs.cpp +++ b/plugins/Dbx_mmap_SA/src/dialogs.cpp @@ -70,17 +70,14 @@ INT_PTR ChangePassword(WPARAM wParam, LPARAM lParam) void xModifyMenu(HANDLE hMenu,long flags,const TCHAR* name, HICON hIcon)
{
- CLISTMENUITEM menu;
- ZeroMemory(&menu,sizeof(menu));
- menu.cbSize = sizeof(menu);
- menu.flags = CMIM_FLAGS | CMIF_TCHAR;
- menu.flags |= name ? CMIM_NAME : 0;
- menu.flags |= hIcon ? CMIM_ICON : 0;
- menu.flags |= flags;
- menu.ptszName = (TCHAR*)name;
- menu.hIcon = hIcon;
-
- CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hMenu,(LPARAM)&menu);
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIM_FLAGS | CMIF_TCHAR;
+ mi.flags |= name ? CMIM_NAME : 0;
+ mi.flags |= hIcon ? CMIM_ICON : 0;
+ mi.flags |= flags;
+ mi.ptszName = (TCHAR*)name;
+ mi.hIcon = hIcon;
+ CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hMenu,(LPARAM)&mi);
}
int InitMenus(WPARAM, LPARAM)
@@ -106,15 +103,14 @@ int InitMenus(WPARAM, LPARAM) HANDLE hIcon = Skin_AddIcon(&sid);
// main menu item
- CLISTMENUITEM menu = {0};
- menu.cbSize = sizeof(menu);
- menu.flags = CMIM_ALL | CMIF_TCHAR | CMIF_ICONFROMICOLIB;
- menu.icolibItem = hIcon;
- menu.ptszName = (g_Db->m_bEncoding) ? LPGENT("Change password") : LPGENT("Set password");
- menu.ptszPopupName = LPGENT("Database");
- menu.pszService = MS_DB_CHANGEPASSWORD;
- menu.position = 500100000;
- hSetPwdMenu = Menu_AddMainMenuItem(&menu);
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIM_ALL | CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+ mi.icolibItem = hIcon;
+ mi.ptszName = (g_Db->m_bEncoding) ? LPGENT("Change password") : LPGENT("Set password");
+ mi.ptszPopupName = LPGENT("Database");
+ mi.pszService = MS_DB_CHANGEPASSWORD;
+ mi.position = 500100000;
+ hSetPwdMenu = Menu_AddMainMenuItem(&mi);
return 0;
}
|