[1/2] comctl32/listview: support header images (try 2)

Daniel Jelinski djelinski1 at gmail.com
Sun Jan 6 14:15:39 CST 2013


-------------- next part --------------
From 97e18598e43fba72214568737360bc02ec6da45d Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Sat, 5 Jan 2013 23:17:25 +0100
Subject: comctl32/listview: support header images (try 2)

Header image list is the same as listview's small image list.
Try 2: also set image list when header is created after LVM_SETIMAGELIST.
---
 dlls/comctl32/listview.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 977bb18..84d02c9 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -1670,6 +1670,10 @@ static INT LISTVIEW_CreateHeader(LISTVIEW_INFO *infoPtr)
     /* set header font */
     SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, TRUE);
 
+    /* set header image list */
+    if (infoPtr->himlSmall)
+        SendMessageW(infoPtr->hwndHeader, HDM_SETIMAGELIST, 0, (LPARAM)infoPtr->himlSmall);
+
     LISTVIEW_UpdateSize(infoPtr);
 
     return 0;
@@ -8636,6 +8640,8 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG
         himlOld = infoPtr->himlSmall;
         infoPtr->himlSmall = himl;
         if (infoPtr->uView != LV_VIEW_ICON) set_icon_size(&infoPtr->iconSize, himl, TRUE);
+        if (infoPtr->hwndHeader)
+            SendMessageW(infoPtr->hwndHeader, HDM_SETIMAGELIST, 0, (LPARAM)himl);
     break;
 
     case LVSIL_STATE:
-- 
1.7.5.4


More information about the wine-patches mailing list