summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-06 17:24:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-06 17:24:35 +0000
commitad1bd063790ee39e1eec167674e733b97de6df1d (patch)
tree2a687cc23dbfc9a0726de7f1fc0d1fb8a9388f5a /src/modules
parentddf8823e6c6a2d8faaf0d1616c7d986be39b5e6e (diff)
fix for 32x32 icons in buttons
git-svn-id: http://svn.miranda-ng.org/main/trunk@1384 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/button/button.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/button/button.cpp b/src/modules/button/button.cpp
index f1592c8ada..931295e7af 100644
--- a/src/modules/button/button.cpp
+++ b/src/modules/button/button.cpp
@@ -190,7 +190,13 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint)
iy++;
}
- DrawState(hdcMem, NULL, NULL, (LPARAM)ctl->hIcon, 0, ix, iy, g_cxsmIcon, g_cysmIcon, IsWindowEnabled(ctl->hwnd) ? DST_ICON | DSS_NORMAL : DST_ICON | DSS_DISABLED);
+ HIMAGELIST hImageList = ImageList_Create(g_cxsmIcon, g_cysmIcon, ILC_MASK | (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16), 1, 0);
+ ImageList_AddIcon(hImageList, ctl->hIcon);
+ HICON hIconNew = ImageList_GetIcon(hImageList, 0, ILD_NORMAL);
+ DrawState(hdcMem, NULL, NULL, (LPARAM) hIconNew, 0, ix, iy, g_cxsmIcon, g_cysmIcon, DST_ICON | (IsWindowEnabled(ctl->hwnd) ? DSS_NORMAL : DSS_DISABLED));
+ ImageList_RemoveAll(hImageList);
+ ImageList_Destroy(hImageList);
+ DestroyIcon(hIconNew);
}
else if (ctl->hBitmap) {
BITMAP bminfo;