list view completely mangled in WINE

Filip Navara xnavara at volny.cz
Fri Jul 30 22:52:21 CDT 2004


Tobias Burnus wrote:
[snip]

Can you try the attached patch please?

Regards,
Filip
-------------- next part --------------
Changelog:
- Don't update infoPtr->dwStyle in LISTVIEW_WindoProc. It's already
  handled in LISTVIEW_StyleChanged and LISTVIEW_Create processing.
- Fix TOOLBAR_DrawMasked to correctly use image list mask.

Index: comctl32/toolbar.c
===================================================================
--- comctl32/toolbar.c	(revision 1)
+++ comctl32/toolbar.c	(working copy)
@@ -658,8 +658,7 @@
 
         /* Create src image */
         hdcImage = CreateCompatibleDC(hdc);
-        hbmImage = CreateBitmap(cx, cy, GetDeviceCaps(hdc,PLANES),
-                                GetDeviceCaps(hdc,BITSPIXEL), NULL);
+        hbmImage = CreateCompatibleBitmap(hdc, cx, cy);
         SelectObject(hdcImage, hbmImage);
         ImageList_DrawEx(himl, index, hdcImage, 0, 0, cx, cy,
                          RGB(0xff, 0xff, 0xff), RGB(0,0,0), ILD_NORMAL);
@@ -670,8 +669,8 @@
         SelectObject(hdcMask, hbmMask);
 
         /* Remove the background and all white pixels */
-        SetBkColor(hdcImage, ImageList_GetBkColor(himl));
-        BitBlt(hdcMask, 0, 0, cx, cy, hdcImage, 0, 0, SRCCOPY);
+        ImageList_DrawEx(himl, index, hdcMask, 0, 0, cx, cy,
+                         RGB(0xff, 0xff, 0xff), RGB(0,0,0), ILD_MASK);
         SetBkColor(hdcImage, RGB(0xff, 0xff, 0xff));
         BitBlt(hdcMask, 0, 0, cx, cy, hdcImage, 0, 0, NOTSRCERASE);
 
Index: comctl32/listview.c
===================================================================
--- comctl32/listview.c	(revision 1)
+++ comctl32/listview.c	(working copy)
@@ -117,7 +117,6 @@
  *   -- LVM_GETISEARCHSTRINGW, LVM_GETISEARCHSTRINGA
  *   -- LVM_GETTILEINFO, LVM_SETTILEINFO
  *   -- LVM_GETTILEVIEWINFO, LVM_SETTILEVIEWINFO
- *   -- LVM_GETTOOLTIPS, LVM_SETTOOLTIPS
  *   -- LVM_GETUNICODEFORMAT, LVM_SETUNICODEFORMAT
  *   -- LVM_GETVIEW, LVM_SETVIEW
  *   -- LVM_GETWORKAREAS, LVM_SETWORKAREAS
@@ -8782,11 +8781,6 @@
   if (!infoPtr && (uMsg != WM_CREATE))
     return DefWindowProcW(hwnd, uMsg, wParam, lParam);
 
-  if (infoPtr)
-  {
-    infoPtr->dwStyle = GetWindowLongW(hwnd, GWL_STYLE);
-  }
-
   switch (uMsg)
   {
   case LVM_APPROXIMATEVIEWRECT:


More information about the wine-devel mailing list