comctl32/listview: Take care of scrolling offset when repositioning header.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5b397df631)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Nikolay Sivov 2019-02-09 23:23:40 +03:00 committed by Michael Stefaniuc
parent c75d8e66a5
commit 59202a9a6a
1 changed files with 12 additions and 4 deletions

View File

@ -11084,13 +11084,21 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
infoPtr->rcList.bottom = max (infoPtr->rcList.bottom - 2, 0);
}
/* if control created invisible header isn't created */
/* When ListView control is created invisible, header isn't created right away. */
if (infoPtr->hwndHeader)
{
HDLAYOUT hl;
WINDOWPOS wp;
POINT origin;
WINDOWPOS wp;
HDLAYOUT hl;
RECT rect;
hl.prc = &infoPtr->rcList;
LISTVIEW_GetOrigin(infoPtr, &origin);
rect = infoPtr->rcList;
rect.left += origin.x;
rect.top += origin.y;
hl.prc = &rect;
hl.pwpos = &wp;
SendMessageW( infoPtr->hwndHeader, HDM_LAYOUT, 0, (LPARAM)&hl );
TRACE(" wp.flags=0x%08x, wp=%d,%d (%dx%d)\n", wp.flags, wp.x, wp.y, wp.cx, wp.cy);