comctl32: Postpone setting the property sheet focus until the tab control is initialized.
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Oct 5 01:18:21 CDT 2010
GTA2 Manager depends on this, it tries to access the tab control on activation
and crashes. This patch fixes the regression reported in the bug #24468.
---
dlls/comctl32/propsheet.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 3e313ba..3d2cd3b 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -3415,10 +3415,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
/* set up the Next and Back buttons by default */
PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
- SetFocus(GetDlgItem(hwnd, IDC_NEXT_BUTTON));
}
- else
- SetFocus(GetDlgItem(hwnd, IDOK));
/* Set up fonts */
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
@@ -3464,6 +3461,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ShowWindow(hwndTabCtrl, SW_HIDE);
PROPSHEET_AdjustSizeWizard(hwnd, psInfo);
PROPSHEET_AdjustButtonsWizard(hwnd, psInfo);
+ SetFocus(GetDlgItem(hwnd, IDC_NEXT_BUTTON));
}
else
{
@@ -3472,6 +3470,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PROPSHEET_AdjustSize(hwnd, psInfo);
PROPSHEET_AdjustButtons(hwnd, psInfo);
}
+ SetFocus(GetDlgItem(hwnd, IDOK));
}
if (IS_INTRESOURCE(psInfo->ppshheader.pszCaption) &&
--
1.7.0.6
More information about the wine-patches
mailing list