Adjust the tab contents to fix the propsheet between PSM_KILLACTIVE

and PSM_SETACTIVE.
This commit is contained in:
Mike McCormack 2004-08-23 17:51:19 +00:00 committed by Alexandre Julliard
parent 1bd7986c93
commit 90c25514fe
1 changed files with 12 additions and 0 deletions

View File

@ -2040,6 +2040,8 @@ static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg)
HWND hwndPage;
PSHNOTIFY psn;
BOOL res = FALSE;
HWND hwndTabControl;
RECT rect;
TRACE("active_page %d\n", psInfo->active_page);
if (!psInfo)
@ -2065,6 +2067,16 @@ static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg)
res = !SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
/*
* Re-adjust the tab control's contents
*/
hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
memset( &rect, 0, sizeof rect );
GetClientRect( hwndTabControl, &rect );
SendMessageW( hwndTabControl, TCM_ADJUSTRECT, 0, (LPARAM) &rect );
SetWindowPos( hwndPage, NULL, rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top, 0 );
end:
TRACE("<-- %d\n", res);
return res;