Commit 6bc8ecaf authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

regedit: Use the system metrics to retrieve the treeview icon sizes.

parent 8cb12084
...@@ -43,8 +43,6 @@ int Image_Open; ...@@ -43,8 +43,6 @@ int Image_Open;
int Image_Closed; int Image_Closed;
int Image_Root; int Image_Root;
#define CX_ICON 16
#define CY_ICON 16
#define NUM_ICONS 3 #define NUM_ICONS 3
static BOOL UpdateExpandingTree(HWND hwndTV, HTREEITEM hItem, int state); static BOOL UpdateExpandingTree(HWND hwndTV, HTREEITEM hItem, int state);
...@@ -599,10 +597,11 @@ static BOOL InitTreeViewImageLists(HWND hwndTV) ...@@ -599,10 +597,11 @@ static BOOL InitTreeViewImageLists(HWND hwndTV)
{ {
HIMAGELIST himl; /* handle to image list */ HIMAGELIST himl; /* handle to image list */
HICON hico; /* handle to icon */ HICON hico; /* handle to icon */
INT cx = GetSystemMetrics(SM_CXSMICON);
INT cy = GetSystemMetrics(SM_CYSMICON);
/* Create the image list. */ /* Create the image list. */
if ((himl = ImageList_Create(CX_ICON, CY_ICON, if ((himl = ImageList_Create(cx, cy, ILC_MASK, 0, NUM_ICONS)) == NULL)
ILC_MASK, 0, NUM_ICONS)) == NULL)
return FALSE; return FALSE;
/* Add the open file, closed file, and document bitmaps. */ /* Add the open file, closed file, and document bitmaps. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment