From fdb7412725d492442d02de70637eadc0314ecfa5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 12 Jul 2009 04:40:58 +0400 Subject: [PATCH] comctl32/header: Update item bounds on WM_SIZE. --- dlls/comctl32/header.c | 3 +-- dlls/comctl32/tests/header.c | 32 ++++++++++---------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index aa68102385b..1ee58cdb4fc 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -247,8 +247,7 @@ HEADER_SetItemBounds (HEADER_INFO *infoPtr) static LRESULT HEADER_Size (HEADER_INFO *infoPtr) { - infoPtr->bRectsValid = FALSE; - + HEADER_SetItemBounds(infoPtr); return 0; } diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 3b6aa306aad..bf3960e9605 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -819,10 +819,8 @@ static void test_hdm_getitemrect(HWND hParent) expect(80, rect.left); expect(0, rect.top); expect(160, rect.right); - todo_wine - { - expect(g_customheight, rect.bottom); - } + expect(g_customheight, rect.bottom); + retVal = SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM) &rect); ok(retVal == TRUE, "Getting item rect should TRUE, got %d\n", retVal); @@ -831,10 +829,8 @@ static void test_hdm_getitemrect(HWND hParent) expect(0, rect.top); expect(80, rect.right); - todo_wine - { - expect(g_customheight, rect.bottom); - } + expect(g_customheight, rect.bottom); + retVal = SendMessage(hChild, HDM_GETITEMRECT, 10, (LPARAM) &rect); ok(retVal == 0, "Getting rect of nonexistent item should return 0, got %d\n", retVal); @@ -906,20 +902,14 @@ static void test_hdm_hittest(HWND hParent) flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo); - todo_wine - { - expect(0, retVal); - expect(0, hdHitTestInfo.iItem); - } + expect(0, retVal); + expect(0, hdHitTestInfo.iItem); pt.x = secondItemRightBoundary - 1; pt.y = bottomBoundary - 1; hdHitTestInfo.pt = pt; retVal = SendMessage(hChild, HDM_HITTEST, 1, (LPARAM) &hdHitTestInfo); - todo_wine - { - expect(1, retVal); - } + expect(1, retVal); expect(1, hdHitTestInfo.iItem); pt.x = secondItemRightBoundary; @@ -950,11 +940,9 @@ static void test_hdm_sethotdivider(HWND hParent) "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); - todo_wine - { - retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(5, 5)); - expect(0, retVal); - } + retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(5, 5)); + expect(0, retVal); + retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 100); expect(100, retVal); retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 1);