comctl32: Correctly assign focus and default button in property sheet wizards.
This commit is contained in:
parent
4a14ed43fa
commit
ac34e22ef3
@ -1549,6 +1549,7 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
|
|||||||
{
|
{
|
||||||
HWND hwndTabCtrl;
|
HWND hwndTabCtrl;
|
||||||
HWND hwndLineHeader;
|
HWND hwndLineHeader;
|
||||||
|
HWND control;
|
||||||
LPCPROPSHEETPAGEW ppshpage;
|
LPCPROPSHEETPAGEW ppshpage;
|
||||||
|
|
||||||
TRACE("active_page %d, index %d\n", psInfo->active_page, index);
|
TRACE("active_page %d, index %d\n", psInfo->active_page, index);
|
||||||
@ -1569,6 +1570,10 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
|
|||||||
{
|
{
|
||||||
PROPSHEET_SetTitleW(hwndDlg, psInfo->ppshheader.dwFlags,
|
PROPSHEET_SetTitleW(hwndDlg, psInfo->ppshheader.dwFlags,
|
||||||
psInfo->proppage[index].pszText);
|
psInfo->proppage[index].pszText);
|
||||||
|
|
||||||
|
control = GetNextDlgTabItem(psInfo->proppage[index].hwndPage, NULL, FALSE);
|
||||||
|
if(control != NULL)
|
||||||
|
SetFocus(control);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psInfo->active_page != -1)
|
if (psInfo->active_page != -1)
|
||||||
@ -1631,8 +1636,12 @@ static BOOL PROPSHEET_Back(HWND hwndDlg)
|
|||||||
if (idx >= 0 && idx < psInfo->nPages)
|
if (idx >= 0 && idx < psInfo->nPages)
|
||||||
{
|
{
|
||||||
if (PROPSHEET_CanSetCurSel(hwndDlg))
|
if (PROPSHEET_CanSetCurSel(hwndDlg))
|
||||||
|
{
|
||||||
|
SetFocus(GetDlgItem(hwndDlg, IDC_BACK_BUTTON));
|
||||||
|
SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
|
||||||
PROPSHEET_SetCurSel(hwndDlg, idx, -1, 0);
|
PROPSHEET_SetCurSel(hwndDlg, idx, -1, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1669,8 +1678,12 @@ static BOOL PROPSHEET_Next(HWND hwndDlg)
|
|||||||
if (idx < psInfo->nPages )
|
if (idx < psInfo->nPages )
|
||||||
{
|
{
|
||||||
if (PROPSHEET_CanSetCurSel(hwndDlg) != FALSE)
|
if (PROPSHEET_CanSetCurSel(hwndDlg) != FALSE)
|
||||||
|
{
|
||||||
|
SetFocus(GetDlgItem(hwndDlg, IDC_NEXT_BUTTON));
|
||||||
|
SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
|
||||||
PROPSHEET_SetCurSel(hwndDlg, idx, 1, 0);
|
PROPSHEET_SetCurSel(hwndDlg, idx, 1, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -3408,6 +3421,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
/* set up the Next and Back buttons by default */
|
/* set up the Next and Back buttons by default */
|
||||||
PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
|
PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
|
||||||
|
SetFocus(GetDlgItem(hwnd, IDC_NEXT_BUTTON));
|
||||||
|
|
||||||
/* Set up fonts */
|
/* Set up fonts */
|
||||||
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||||
@ -3494,6 +3508,10 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
PROPSHEET_UnChanged(hwnd, NULL);
|
PROPSHEET_UnChanged(hwnd, NULL);
|
||||||
|
|
||||||
|
/* wizards set their focus during init */
|
||||||
|
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user