Ignore window caption from PROPSHEETHEADER in wizards. Update window

caption when changing pages.
This commit is contained in:
Pavel Roskin 2003-10-02 04:26:53 +00:00 committed by Alexandre Julliard
parent 4020a21f97
commit 5b7f03cf9f
1 changed files with 22 additions and 9 deletions

View File

@ -305,6 +305,10 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
PROPSHEET_UnImplementedFlags(lppsh->dwFlags); PROPSHEET_UnImplementedFlags(lppsh->dwFlags);
if (lppsh->dwFlags & INTRNL_ANY_WIZARD)
psInfo->ppshheader.pszCaption = NULL;
else
{
if (HIWORD(lppsh->pszCaption)) if (HIWORD(lppsh->pszCaption))
{ {
int len = strlen(lppsh->pszCaption); int len = strlen(lppsh->pszCaption);
@ -312,6 +316,7 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
MultiByteToWideChar(CP_ACP, 0, lppsh->pszCaption, -1, (LPWSTR) psInfo->ppshheader.pszCaption, len+1); MultiByteToWideChar(CP_ACP, 0, lppsh->pszCaption, -1, (LPWSTR) psInfo->ppshheader.pszCaption, len+1);
/* strcpy( (char *)psInfo->ppshheader.pszCaption, lppsh->pszCaption ); */ /* strcpy( (char *)psInfo->ppshheader.pszCaption, lppsh->pszCaption ); */
} }
}
psInfo->nPages = lppsh->nPages; psInfo->nPages = lppsh->nPages;
if (dwFlags & PSH_USEPSTARTPAGE) if (dwFlags & PSH_USEPSTARTPAGE)
@ -355,12 +360,17 @@ static BOOL PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
PROPSHEET_UnImplementedFlags(lppsh->dwFlags); PROPSHEET_UnImplementedFlags(lppsh->dwFlags);
if (HIWORD(lppsh->pszCaption)) if (lppsh->dwFlags & INTRNL_ANY_WIZARD)
psInfo->ppshheader.pszCaption = NULL;
else
{
if (!(lppsh->dwFlags & INTRNL_ANY_WIZARD) && HIWORD(lppsh->pszCaption))
{ {
int len = strlenW(lppsh->pszCaption); int len = strlenW(lppsh->pszCaption);
psInfo->ppshheader.pszCaption = HeapAlloc( GetProcessHeap(), 0, (len+1)*sizeof(WCHAR) ); psInfo->ppshheader.pszCaption = HeapAlloc( GetProcessHeap(), 0, (len+1)*sizeof(WCHAR) );
strcpyW( (WCHAR *)psInfo->ppshheader.pszCaption, lppsh->pszCaption ); strcpyW( (WCHAR *)psInfo->ppshheader.pszCaption, lppsh->pszCaption );
} }
}
psInfo->nPages = lppsh->nPages; psInfo->nPages = lppsh->nPages;
if (dwFlags & PSH_USEPSTARTPAGE) if (dwFlags & PSH_USEPSTARTPAGE)
@ -1554,6 +1564,9 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage); PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage);
} }
PROPSHEET_SetTitleW(hwndDlg, psInfo->ppshheader.dwFlags,
psInfo->proppage[index].pszText);
if (psInfo->active_page != -1) if (psInfo->active_page != -1)
ShowWindow(psInfo->proppage[psInfo->active_page].hwndPage, SW_HIDE); ShowWindow(psInfo->proppage[psInfo->active_page].hwndPage, SW_HIDE);