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/UserInfoEx | |
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/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTree.cpp | 4 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_annivedit.cpp | 5 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_contact.cpp | 5 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_profile.cpp | 5 |
4 files changed, 8 insertions, 11 deletions
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index 15b6bf5f8a..033ce4c271 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -717,7 +717,6 @@ int CPsTree::EndLabelEdit(const BYTE bSave) void CPsTree::PopupMenu() { HMENU hPopup; - MENUITEMINFO mii; TVHITTESTINFO hti; TVITEM tvi; POINT pt; @@ -726,7 +725,8 @@ void CPsTree::PopupMenu() // init popup menu if (!(hPopup = CreatePopupMenu())) return; - memset(&mii, 0, sizeof(MENUITEMINFO)); + + MENUITEMINFO mii = { 0 }; mii.cbSize = sizeof(mii); mii.fMask = MIIM_STRING|MIIM_ID; diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index cf8a7ef0d7..25454e73c3 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -432,15 +432,14 @@ void CAnnivEditCtrl::OnMenuPopup() {
POINT pt = { 0, 0 };
RECT rc;
- MENUITEMINFO mii;
HMENU hMenu;
WORD i;
if (hMenu = CreatePopupMenu()) {
SetFocus(_hBtnMenu);
- memset(&mii, 0, sizeof(MENUITEMINFO));
- mii.cbSize = sizeof(MENUITEMINFO);
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_ID|MIIM_STRING|MIIM_STATE;
// insert the items
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 7576bf10e6..b8780f5b7b 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -605,15 +605,14 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (HIWORD(wParam) == BN_CLICKED) {
POINT pt = { 0, 0 };
RECT rc;
- MENUITEMINFO mii;
int i, nItems;
HMENU hMenu;
if (!(hMenu = CreatePopupMenu())) return 0;
SetFocus((HWND)lParam);
- memset(&mii, 0, sizeof(MENUITEMINFO));
- mii.cbSize = sizeof(MENUITEMINFO);
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_ID|MIIM_STRING|MIIM_FTYPE|MIIM_STATE;
mii.fType = MFT_STRING;
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index c8773a3419..1cf4dfff49 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -1258,7 +1258,6 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case NM_RCLICK:
{
HMENU hMenu = CreatePopupMenu();
- MENUITEMINFO mii;
MCONTACT hContact;
LVHITTESTINFO hi;
LPLCITEM pItem;
@@ -1274,8 +1273,8 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR pItem = ProfileList_GetItemData(((LPNMHDR)lParam)->hwndFrom, hi.iItem);
// insert menuitems
- memset(&mii, 0, sizeof(MENUITEMINFO));
- mii.cbSize = sizeof(MENUITEMINFO);
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_ID|MIIM_STRING;
// insert "Add" Menuitem
mii.wID = BTN_ADD_intEREST;
|