rebar: In AutoSize get the window rc after REBAR_Layout if needed to respect the...
authorAric Stewart <aric@codeweavers.com>
Mon, 17 Mar 2008 09:00:53 +0000 (18:00 +0900)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 18 Mar 2008 11:43:32 +0000 (12:43 +0100)
dlls/comctl32/rebar.c

index f1f823a17fe915c45ef6930dd8194e47c42df19a..7b1f00842c94a8f640b57ea3231712ddf55a6e1e 100644 (file)
@@ -1516,9 +1516,9 @@ REBAR_AutoSize(REBAR_INFO *infoPtr, BOOL needsLayout)
     RECT rc, rcNew;
     NMRBAUTOSIZE autosize;
 
-    GetClientRect(infoPtr->hwndSelf, &rc);
     if (needsLayout)
         REBAR_Layout(infoPtr);
+    GetClientRect(infoPtr->hwndSelf, &rc);
     REBAR_SizeToHeight(infoPtr, get_rect_cy(infoPtr, &rc));
     GetClientRect(infoPtr->hwndSelf, &rcNew);