Wizard mode property sheets have a tab control.

This commit is contained in:
Thuy Nguyen 1999-10-31 02:24:29 +00:00 committed by Alexandre Julliard
parent abe722778f
commit 709b083824
2 changed files with 10 additions and 11 deletions

View File

@ -893,7 +893,6 @@ static int PROPSHEET_CreatePage(HWND hwndParent,
RECT rc; RECT rc;
PropPageInfo* ppInfo = psInfo->proppage; PropPageInfo* ppInfo = psInfo->proppage;
PADDING_INFO padding; PADDING_INFO padding;
HWND hwndAfter;
TRACE("index %d\n", index); TRACE("index %d\n", index);
@ -948,11 +947,7 @@ static int PROPSHEET_CreatePage(HWND hwndParent,
MapDialogRect(hwndParent, &rc); MapDialogRect(hwndParent, &rc);
if (psInfo->ppshheader->dwFlags & PSH_WIZARD) if (psInfo->ppshheader->dwFlags & PSH_WIZARD)
{
GetWindowRect(hwndParent, &rc);
padding = PROPSHEET_GetPaddingInfoWizard(hwndParent); padding = PROPSHEET_GetPaddingInfoWizard(hwndParent);
hwndAfter = hwndParent;
}
else else
{ {
/* /*
@ -962,10 +957,9 @@ static int PROPSHEET_CreatePage(HWND hwndParent,
HWND hwndTabCtrl = GetDlgItem(hwndParent, IDC_TABCONTROL); HWND hwndTabCtrl = GetDlgItem(hwndParent, IDC_TABCONTROL);
SendMessageA(hwndTabCtrl, TCM_ADJUSTRECT, FALSE, (LPARAM)&rc); SendMessageA(hwndTabCtrl, TCM_ADJUSTRECT, FALSE, (LPARAM)&rc);
padding = PROPSHEET_GetPaddingInfo(hwndParent); padding = PROPSHEET_GetPaddingInfo(hwndParent);
hwndAfter = HWND_TOP;
} }
SetWindowPos(hwndPage, hwndAfter, SetWindowPos(hwndPage, HWND_TOP,
rc.left + padding.x, rc.left + padding.x,
rc.top + padding.y, rc.top + padding.y,
0, 0, SWP_NOSIZE); 0, 0, SWP_NOSIZE);
@ -1287,7 +1281,7 @@ static void PROPSHEET_PressButton(HWND hwndDlg, int buttonID)
/************************************************************************* /*************************************************************************
* BOOL PROPSHEET_CanSetCurSel [Internal] * BOOL PROPSHEET_CanSetCurSel [Internal]
* *
* Test weither the current page can be change by sending a PSN_KILLACTIVE * Test weither the current page can be changed by sending a PSN_KILLACTIVE
* *
* PARAMS * PARAMS
* hwndDlg [I] handle to a Dialog hWnd * hwndDlg [I] handle to a Dialog hWnd
@ -1303,6 +1297,10 @@ static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg)
PropSheetInfoStr); PropSheetInfoStr);
HWND hwndPage; HWND hwndPage;
NMHDR hdr; NMHDR hdr;
if (!psInfo)
return FALSE;
/* /*
* Notify the current page. * Notify the current page.
*/ */
@ -1825,6 +1823,8 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
GetWindowTextA(hwnd, psInfo->strPropertiesFor, MAX_CAPTION_LENGTH); GetWindowTextA(hwnd, psInfo->strPropertiesFor, MAX_CAPTION_LENGTH);
PROPSHEET_CreateTabControl(hwnd, psInfo);
if (psInfo->ppshheader->dwFlags & PSH_WIZARD) if (psInfo->ppshheader->dwFlags & PSH_WIZARD)
{ {
HWND hwndBack = GetDlgItem(hwnd, IDC_BACK_BUTTON); HWND hwndBack = GetDlgItem(hwnd, IDC_BACK_BUTTON);
@ -1841,8 +1841,6 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
else else
{ {
PROPSHEET_CreateTabControl(hwnd, psInfo);
if (PROPSHEET_IsTooSmall(hwnd, psInfo)) if (PROPSHEET_IsTooSmall(hwnd, psInfo))
{ {
PROPSHEET_AdjustSize(hwnd, psInfo); PROPSHEET_AdjustSize(hwnd, psInfo);

View File

@ -16,7 +16,7 @@ END
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 292, 159 IDD_WIZARD DIALOG DISCARDABLE 0, 0, 292, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CONTROL | WS_VISIBLE STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard" CAPTION "Wizard"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
@ -26,6 +26,7 @@ BEGIN
PUSHBUTTON "Cancel", IDCANCEL,178,138,50,14 PUSHBUTTON "Cancel", IDCANCEL,178,138,50,14
PUSHBUTTON "Help", IDHELP,235,138,50,14 PUSHBUTTON "Help", IDHELP,235,138,50,14
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
END END