From 2e711d104e232f6e957cf2dcd6954f659c980f02 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 23 Feb 2013 16:14:06 +0000 Subject: correct Jabber account icon calculation git-svn-id: http://svn.miranda-ng.org/main/trunk@3734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/protocols/protoopts.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 636a316222..80471da93f 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -547,9 +547,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM case WM_DRAWITEM: { - int tmp, size, length; + int tmp; TCHAR *text; - HICON hIcon; HBRUSH hbrBack; SIZE sz; @@ -584,7 +583,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM else tmp = acc->bIsEnabled ? SKINICON_OTHER_TICK : SKINICON_OTHER_NOTICK; - hIcon = LoadSkinnedIcon(tmp); + HICON hIcon = LoadSkinnedIcon(tmp); DrawIconEx(lps->hDC, lps->rcItem.left, lps->rcItem.top, hIcon, cxIcon, cyIcon, 0, hbrBack, DI_NORMAL); IcoLib_ReleaseIcon(hIcon, 0); @@ -597,8 +596,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM } lps->rcItem.left += cxIcon + 2; - length = SendDlgItemMessage(hwndDlg, IDC_ACCLIST, LB_GETTEXTLEN, lps->itemID, 0); - size = max(length+1, 256); + int length = SendDlgItemMessage(hwndDlg, IDC_ACCLIST, LB_GETTEXTLEN, lps->itemID, 0); + int size = max(length+1, 256); text = (TCHAR *)_alloca(sizeof(TCHAR) * size); SendDlgItemMessage(hwndDlg, IDC_ACCLIST, LB_GETTEXT, lps->itemID, (LPARAM)text); -- cgit v1.2.3