From 727a0432f5909ba54e6d15010fde94dff825fe5e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 24 Jun 2015 15:02:42 +0000 Subject: fixes for MENUITEMINFO declarations git-svn-id: http://svn.miranda-ng.org/main/trunk@14363 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp | 6 ++++-- plugins/Clist_nicer/src/clistevents.cpp | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'plugins/Clist_nicer/src') diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index cbce3fa8a4..d203d954c9 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -108,7 +108,8 @@ INT_PTR GroupMenuCheckService(WPARAM, LPARAM) INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) { MENUITEMINFO *mii = (MENUITEMINFO *)wParam; - if (mii == NULL) return 0; + if (mii == NULL) + return 0; if (hHideShowMainMenuItem == (HANDLE)lParam) { mii->fMask |= MIIM_STATE; @@ -418,7 +419,8 @@ INT_PTR SubGroupMenuCheckService(WPARAM, LPARAM) INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM) { MENUITEMINFO *mii = (MENUITEMINFO *)wParam; - if (mii == NULL) return 0; + if (mii == NULL) + return 0; /* if (hHideShowMainMenuItem == (HANDLE)lParam) { diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index 47fe8121d9..9d7e722d8b 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -158,20 +158,21 @@ LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_COMMAND: if (LOWORD(wParam) == IDC_NOTIFYBUTTON) { int iSelection; - MENUITEMINFO mii = { 0 }; - POINT pt; struct NotifyMenuItemExData *nmi = 0; int iCount = GetMenuItemCount(cfg::dat.hMenuNotify); - BOOL result; + POINT pt; GetCursorPos(&pt); + + MENUITEMINFO mii = { 0 }; mii.cbSize = sizeof(mii); mii.fMask = MIIM_DATA; if (iCount > 1) iSelection = TrackPopupMenu(cfg::dat.hMenuNotify, TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, NULL); else iSelection = GetMenuItemID(cfg::dat.hMenuNotify, 0); - result = GetMenuItemInfo(cfg::dat.hMenuNotify, (UINT)iSelection, FALSE, &mii); + + BOOL result = GetMenuItemInfo(cfg::dat.hMenuNotify, (UINT)iSelection, FALSE, &mii); if (result != 0) { nmi = (struct NotifyMenuItemExData *) mii.dwItemData; if (nmi) { @@ -260,7 +261,8 @@ CListEvent* AddEvent(CLISTEVENT *cle) return NULL; if (p->cle.hContact != 0 && p->cle.hDbEvent != 1 && !(p->cle.flags & CLEF_ONLYAFEW)) { - MENUITEMINFO mii = { sizeof(mii) }; + MENUITEMINFO mii = { 0 }; + mii.cbSize = sizeof(mii); mii.fMask = MIIM_DATA | MIIM_BITMAP | MIIM_ID; if (p->cle.pszService && !strncmp("SRMsg/ReadMessage", p->cle.pszService, 17)) { // dup check only for msg events -- cgit v1.2.3