[PATCH] regedit: Use the system metrics to retrieve the treeview icon sizes.
Huw Davies
huw at codeweavers.com
Thu Apr 27 08:27:21 CDT 2017
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
programs/regedit/treeview.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c
index 4b5e1ca2c5..d11793ca9d 100644
--- a/programs/regedit/treeview.c
+++ b/programs/regedit/treeview.c
@@ -43,8 +43,6 @@ int Image_Open;
int Image_Closed;
int Image_Root;
-#define CX_ICON 16
-#define CY_ICON 16
#define NUM_ICONS 3
static BOOL UpdateExpandingTree(HWND hwndTV, HTREEITEM hItem, int state);
@@ -599,10 +597,11 @@ static BOOL InitTreeViewImageLists(HWND hwndTV)
{
HIMAGELIST himl; /* handle to image list */
HICON hico; /* handle to icon */
+ INT cx = GetSystemMetrics(SM_CXSMICON);
+ INT cy = GetSystemMetrics(SM_CYSMICON);
/* Create the image list. */
- if ((himl = ImageList_Create(CX_ICON, CY_ICON,
- ILC_MASK, 0, NUM_ICONS)) == NULL)
+ if ((himl = ImageList_Create(cx, cy, ILC_MASK, 0, NUM_ICONS)) == NULL)
return FALSE;
/* Add the open file, closed file, and document bitmaps. */
--
2.12.0
More information about the wine-patches
mailing list