diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-23 16:14:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-23 16:14:06 +0000 |
commit | 2e711d104e232f6e957cf2dcd6954f659c980f02 (patch) | |
tree | 2bc5e957690ffb17550014577d4fcebca0a2505b /src | |
parent | ee8802d8809f2effd5ae827cba7137f2dd684b6d (diff) |
correct Jabber account icon calculation
git-svn-id: http://svn.miranda-ng.org/main/trunk@3734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/protocols/protoopts.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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);
|