From 2a8463b558ab5406e696f96d04fc279cfc7f2833 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 30 Mar 2007 11:35:12 -0500 Subject: [PATCH] comctl32: Unset active page while setting a new active page for a propsheet. Before calling the PSN_SETACTIVE in PROPSHEET_SetCurSel set the active_page to -1. This prevents crashes and corruption of the property sheet if the application makes any modifications during the PSN_SETACTIVE. --- dlls/comctl32/propsheet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 636b0b286c3..c84f23aef92 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -2023,6 +2023,11 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg, return FALSE; } + /* unset active page while doing this transition. */ + if (psInfo->active_page != -1) + ShowWindow(psInfo->proppage[psInfo->active_page].hwndPage, SW_HIDE); + psInfo->active_page = -1; + while (1) { int result; PSHNOTIFY psn; -- 2.11.4.GIT