If a listview is created with LVS_NOCOLUMNEHEADER then wine creates the

header like normal but just sets it not visible. This fix lays out
those supposedly nonexistent headers to size 0,0. So that even if they
become visible they are not drawn.
This commit is contained in:
Aric Stewart 2000-05-23 01:24:24 +00:00 committed by Alexandre Julliard
parent 85f5832bad
commit 9a3dd5b249
1 changed files with 29 additions and 6 deletions

View File

@ -6001,6 +6001,19 @@ static LRESULT LISTVIEW_Create(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
ShowWindow(infoPtr->hwndHeader, SW_SHOWNORMAL);
}
else
{
/* resize our header to nothing */
RECT zeroRect;
WINDOWPOS wp;
HDLAYOUT hd;
memset(&zeroRect,0,sizeof(RECT));
hd.prc = &zeroRect;
hd.pwpos = ℘
Header_Layout(infoPtr->hwndHeader,&hd);
}
infoPtr->iconSize.cx = GetSystemMetrics(SM_CXSMICON);
infoPtr->iconSize.cy = GetSystemMetrics(SM_CYSMICON);
@ -7166,7 +7179,7 @@ static VOID LISTVIEW_UpdateSize(HWND hwnd)
}
}
}
else if (uView == LVS_REPORT)
else if ((uView == LVS_REPORT)&&(!(LVS_NOCOLUMNHEADER & lStyle)))
{
HDLAYOUT hl;
WINDOWPOS wp;
@ -7241,15 +7254,25 @@ static INT LISTVIEW_StyleChanged(HWND hwnd, WPARAM wStyleType,
HDLAYOUT hl;
WINDOWPOS wp;
if (!(LVS_NOCOLUMNHEADER & lpss->styleNew))
{
hl.prc = &rcList;
hl.pwpos = ℘
Header_Layout(infoPtr->hwndHeader, &hl);
SetWindowPos(infoPtr->hwndHeader, hwnd, wp.x, wp.y, wp.cx, wp.cy,
wp.flags);
if (!(LVS_NOCOLUMNHEADER & lpss->styleNew))
{
ShowWindow(infoPtr->hwndHeader, SW_SHOWNORMAL);
}
else
{
RECT zeroRect;
ZeroMemory(&zeroRect,sizeof(RECT));
hl.prc = &zeroRect;
hl.pwpos = ℘
Header_Layout(infoPtr->hwndHeader, &hl);
}
infoPtr->iconSize.cx = GetSystemMetrics(SM_CXSMICON);
infoPtr->iconSize.cy = GetSystemMetrics(SM_CYSMICON);
infoPtr->nItemWidth = LISTVIEW_GetItemWidth(hwnd);