summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mmap_SA/src/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mmap_SA/src/dialogs.cpp')
-rw-r--r--plugins/Dbx_mmap_SA/src/dialogs.cpp36
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;
}