Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/listview.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 1230c55d5c..078bea14af 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -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 = ▭ hl.pwpos = ℘ 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);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/listview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 078bea14af..7fa69965ed 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9899,7 +9899,7 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, /* carry on only if it really changed */ if (nNewScrollPos == nOldScrollPos) return 0;
- if (infoPtr->hwndHeader) LISTVIEW_UpdateHeaderSize(infoPtr, nNewScrollPos); + LISTVIEW_UpdateHeaderSize(infoPtr, nNewScrollPos);
/* now adjust to client coordinates */ nScrollDiff = nOldScrollPos - nNewScrollPos;