Fixes bug 54861. The UK Kalender program was crashing when a new event was created as stated in the bug report. The fix is to create all the property sheet pages from the beginning instead of when they are selected.
-- v2: comctl32: Create all prop sheet pages on initialization.
From: Jacob Czekalla jczekalla@codeweavers.com
--- dlls/comctl32/propsheet.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index b530a1a8094..a2beabba721 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -3591,6 +3591,18 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PROPSHEET_CreateTabControl(hwnd, psInfo);
+ for (int index = 0; index < psInfo->nPages;) + { + if (HPSP_get_flags(psInfo->proppage[index].hpage) & PSP_PREMATURE) + { + if (!PROPSHEET_CreatePage(hwnd, index, psInfo, psInfo->proppage[index].hpage)) + PROPSHEET_RemovePage(hwnd, index, NULL); + else + index++; + }else + index++; + } + PROPSHEET_LoadWizardBitmaps(psInfo);
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD)
On Mon Jul 29 15:50:27 2024 +0000, Nikolay Sivov wrote:
Is this testable? For example, does PSM_INDEXTOPAGE work from PSCB_INITIALIZED? That's a random suggestion, after looking at our implementation.
Yes. I can write a test to make sure that the pages get created when the proper flag is set.