Tobias Burnus wrote:
The patch improves the situation a lot! Even Save List works now! Thanks!
Great!
[snip]
Now, I click on the scrollbar to scroll to the rightmost columns; while the header is correct, the list itself contains the FIRST columns not the columns which belong to the column headers
http://www.physik.fu-berlin.de/~tburnus/wine/diamond_list_wine3b.png
Should be fixed in the attached patch, but there is still one problem with refreshing of the list view after shrinking the column headers. Unfortunetly I don't have time to fix that.
Regards, Filip
Changelog: - Don't update infoPtr->dwStyle in LISTVIEW_WindowProc. It's already handled in LISTVIEW_StyleChanged and LISTVIEW_Create processing. - Ignore infoPtr->dwStyle in LISTVIEW_GetOrigin since it doesn't contain up-to-date information about scrollbars. - Fix TOOLBAR_DrawMasked to correctly use image list mask.
--- comctl32/listview.c Sun Jun 27 11:24:44 2004
+++ comctl32/listview.c Mon Aug 2 17:13:54 2004
@@ -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
@@ -5831,9 +5830,9 @@
scrollInfo.cbSize = sizeof(SCROLLINFO);
scrollInfo.fMask = SIF_POS;
- if ((infoPtr->dwStyle & WS_HSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo))
+ if (GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo))
nHorzPos = scrollInfo.nPos;
- if ((infoPtr->dwStyle & WS_VSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo))
+ if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo))
nVertPos = scrollInfo.nPos;
TRACE("nHorzPos=%d, nVertPos=%d\n", nHorzPos, nVertPos);
@@ -8781,11 +8780,6 @@
if (!infoPtr && (uMsg != WM_CREATE))
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
-
- if (infoPtr)
- {
- infoPtr->dwStyle = GetWindowLongW(hwnd, GWL_STYLE);
- }
switch (uMsg)
{
--- comctl32/toolbar.c Wed Jun 16 06:46:14 2004
+++ comctl32/toolbar.c Mon Aug 2 17:13:50 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);
