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/Clist_modern | |
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/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp | 1 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistevents.cpp | 19 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 3 |
4 files changed, 15 insertions, 14 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index 57cf2ac25f..188639ecf0 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -100,7 +100,6 @@ int GroupMenuCheckService(WPARAM, LPARAM) INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
{
-
MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
if (mii == NULL)
return 0;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index cabc2363da..db9139c4b6 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -105,7 +105,8 @@ CListEvent* cli_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, _countof("SRMsg/ReadMessage")) ||
@@ -335,16 +336,13 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) }
else if (iCount > 0) {
MENUITEMINFO mii = { 0 };
- struct NotifyMenuItemExData *nmi;
- TCHAR *szName;
- int iIcon;
-
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA;
GetMenuItemInfo(g_CluiData.hMenuNotify, iCount - 1, TRUE, &mii);
- nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
- szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
- iIcon = cli_GetContactIcon(nmi->hContact);
+
+ NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
+ TCHAR *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
+ int iIcon = cli_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, hDC, 4, (rc.bottom + rc.top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -488,13 +486,14 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP case WM_COMMAND:
if (LOWORD(wParam) == IDC_NOTIFYBUTTON) {
int iSelection;
- MENUITEMINFO mii = { 0 };
- POINT pt;
struct NotifyMenuItemExData *nmi = 0;
int iCount = GetMenuItemCount(g_CluiData.hMenuNotify);
BOOL result;
+ POINT pt;
GetCursorPos(&pt);
+
+ MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA;
if (iCount > 1)
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 7970ff7f31..3e8532ba70 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -251,7 +251,8 @@ HRESULT CLUI::CreateCluiFrames() {
g_hMenuMain = GetMenu(pcli->hwndContactList);
- MENUITEMINFO mii = { sizeof(mii) };
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
SetMenuItemInfo(g_hMenuMain, 0, TRUE, &mii);
@@ -1912,7 +1913,8 @@ LRESULT CLUI::OnCreate(UINT, WPARAM, LPARAM) DrawMenuBar(m_hWnd);
cliCluiProtocolStatusChanged(0, 0);
- MENUITEMINFO mii = { sizeof(mii) };
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_TYPE | MIIM_DATA;
mii.dwItemData = MENU_MIRANDAMENU;
mii.fType = MFT_OWNERDRAW;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 5bd9b5db27..faea096349 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -1086,7 +1086,8 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM goto clvm_reset_command;
TCHAR szTemp[256];
- MENUITEMINFO mii = { sizeof(mii) };
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING;
mii.dwTypeData = szTemp;
mii.cch = 256;
|