From 9a7ddf0e38cfc3f794674e0224c8fea85b61d61e Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 29 Apr 2015 02:22:15 -0400 Subject: [PATCH] Fixed most of the control sizing issues on Windows. The only other problem is initial size of the uiWindow bin child... --- new/windows/tab.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/new/windows/tab.c b/new/windows/tab.c index 0fa97f0e..4444d512 100644 --- a/new/windows/tab.c +++ b/new/windows/tab.c @@ -70,6 +70,7 @@ static void resizeTab(struct tab *t, LONG width, LONG height) { LRESULT n; RECT r; + HWND binHWND; n = SendMessageW(t->hwnd, TCM_GETCURSEL, 0, 0); if (n == (LRESULT) (-1)) // no child selected; do nothing @@ -84,7 +85,9 @@ static void resizeTab(struct tab *t, LONG width, LONG height) // convert to the display rectangle SendMessageW(t->hwnd, TCM_ADJUSTRECT, FALSE, (LPARAM) (&r)); -//TODO uiControlResize(uiControl(t->pages[n]), r.left, r.top, r.right - r.left, r.bottom - r.top); + binHWND = (HWND) uiControlHandle(uiControl(t->pages[n])); + if (MoveWindow(binHWND, r.left, r.top, r.right - r.left, r.bottom - r.top, TRUE) == 0) + logLastError("error resizing uiTab page in resizeTab()"); } // and finally, because we have to resize parents, we have to handle resizes and updates