diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-24 15:02:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-24 15:02:42 +0000 |
commit | 727a0432f5909ba54e6d15010fde94dff825fe5e (patch) | |
tree | 2bca1de02335533dc2678c143e7b8ff088c25d47 /plugins/Scriver | |
parent | 0ccdb951979ead80e9264233776b9147ff701fc7 (diff) |
fixes for MENUITEMINFO declarations
git-svn-id: http://svn.miranda-ng.org/main/trunk@14363 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/chat/tools.cpp | 12 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 3 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 3 | ||||
-rw-r--r-- | plugins/Scriver/src/utils.cpp | 11 |
4 files changed, 16 insertions, 13 deletions
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index 280700fbcb..43aa5c669f 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -108,13 +108,13 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s void DestroyGCMenu(HMENU *hMenu, int iIndex)
{
- MENUITEMINFO mi;
- mi.cbSize = sizeof(mi);
- mi.fMask = MIIM_SUBMENU;
- while(GetMenuItemInfo(*hMenu, iIndex, TRUE, &mi))
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_SUBMENU;
+ while(GetMenuItemInfo(*hMenu, iIndex, TRUE, &mii))
{
- if (mi.hSubMenu != NULL)
- DestroyMenu(mi.hSubMenu);
+ if (mii.hSubMenu != NULL)
+ DestroyMenu(mii.hSubMenu);
RemoveMenu(*hMenu, iIndex, MF_BYPOSITION);
}
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 1ad222c2d8..00f1cf85da 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -1920,7 +1920,8 @@ LABEL_SHOWWINDOW: case WM_RBUTTONUP:
hToolbarMenu = CreatePopupMenu();
for (int i = 0; i < _countof(toolbarButtons); i++) {
- MENUITEMINFO mii = { sizeof(mii) };
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_ID | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_BITMAP;
mii.fType = MFT_STRING;
mii.fState = (g_dat.chatBbuttonVisibility & (1 << i)) ? MFS_CHECKED : MFS_UNCHECKED;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 5157c96e90..e2b3448e1b 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -927,7 +927,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case WM_RBUTTONUP:
hToolbarMenu = CreatePopupMenu();
for (int i = 0; i < _countof(toolbarButtons); i++) {
- MENUITEMINFO mii = { sizeof(mii) };
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_ID | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_BITMAP;
mii.fType = MFT_STRING;
mii.fState = (g_dat.buttonVisibility & (1 << i)) ? MFS_CHECKED : MFS_UNCHECKED;
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 4e650afb20..e5ed4b3a45 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -407,11 +407,12 @@ void SearchWord(TCHAR * word, int engine) void SetSearchEngineIcons(HMENU hMenu, HIMAGELIST hImageList)
{
for (int i = 0; i < IDI_LASTICON - IDI_GOOGLE; i++) {
- MENUITEMINFO minfo = { sizeof(minfo) };
- minfo.fMask = MIIM_BITMAP | MIIM_DATA;
- minfo.hbmpItem = HBMMENU_CALLBACK;
- minfo.dwItemData = (ULONG_PTR)hImageList;
- SetMenuItemInfo(hMenu, IDM_SEARCH_GOOGLE + i, FALSE, &minfo);
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_BITMAP | MIIM_DATA;
+ mii.hbmpItem = HBMMENU_CALLBACK;
+ mii.dwItemData = (ULONG_PTR)hImageList;
+ SetMenuItemInfo(hMenu, IDM_SEARCH_GOOGLE + i, FALSE, &mii);
}
}
|