From 30707c980d1560b358dbf2671a4d2a26a1e8173c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 21:45:37 +0000 Subject: various menu initialization quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/Mra_functions.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'protocols/MRA/src/Mra_functions.cpp') diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index eb6497f506..37e8e60f0c 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1144,11 +1144,10 @@ DWORD CMraProto::CreateBlobFromContact(HANDLE hContact, LPWSTR lpwszRequestReaso void CMraProto::CListShowMenuItem(HANDLE hMenuItem, BOOL bShow) { - CLISTMENUITEM mi = {0}; - - mi.cbSize = sizeof(mi); + CLISTMENUITEM mi = { sizeof(mi) }; mi.flags = CMIM_FLAGS; - if (bShow == FALSE) mi.flags |= CMIF_HIDDEN; + if (bShow == FALSE) + mi.flags |= CMIF_HIDDEN; CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&mi); } @@ -1286,7 +1285,6 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP WCHAR szBuff[STATUS_TITLE_MAX+STATUS_DESC_MAX]; size_t dwBuffSize; WNDPROC OldMessageEditProc; - CLISTMENUITEM mi = {0}; SetWindowLongPtr(hWndDlg, GWLP_USERDATA, (LONG_PTR)0); @@ -1314,7 +1312,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP dat->ppro->mraSetStringExW(NULL, szValueName, szBuff, dwBuffSize); dat->ppro->mraSetStringExW(NULL, DBSETTING_XSTATUSNAME, szBuff, dwBuffSize); - mi.cbSize = sizeof(mi); + CLISTMENUITEM mi = { sizeof(mi) }; mi.flags = (CMIM_NAME|CMIF_UNICODE); mi.ptszName = szBuff; CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)dat->ppro->hXStatusMenuItems[dat->dwXStatus], (LPARAM)&mi); -- cgit v1.2.3