Re: ListView fixes for Diamond (Try 2)
Filip Navara wrote:
Changelog: - Don't update infoPtr->dwStyle in LISTVIEW_WindowProc. It's already handled in LISTVIEW_StyleChanged and LISTVIEW_Create processing. - Ignore WS_VSCROLL/WS_HSCROLL flags in infoPtr->dwStyle because it's not always up-to-date. - Fix TOOLBAR_DrawMasked to correctly use image list mask.
- Filip
------------------------------------------------------------------------
Changelog: - Don't update infoPtr->dwStyle in LISTVIEW_WindowProc. It's already handled in LISTVIEW_StyleChanged and LISTVIEW_Create processing. - Ignore WS_VSCROLL/WS_HSCROLL flags in infoPtr->dwStyle because it's not always up-to-date. - Fix TOOLBAR_DrawMasked to correctly use image list mask.
--- comctl32/listview.c Sat Jul 31 22:07:42 2004 +++ comctl32/listview.c Wed Aug 4 00:19:30 2004
...
--- comctl32/toolbar.c Sat Jul 31 22:07:14 2004 +++ comctl32/toolbar.c Wed Aug 4 00:19:34 2004 @@ -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);
Filip, please put this in a separate patch. Rob
participants (1)
-
Robert Shearman