Last Modification: February 25, 2000

How can I set the title of a property page in Wizard mode?

You can change the page's title using the following code:


BOOL CWizardSheet::SetPageTitle (int nPage, LPTSTR pszText) 
{
	CPropertyPage *pPage = GetPage (nPage);
	CTabCtrl* pTab = GetTabControl();
	ASSERT (pTab);
	if (GetActivePage() == pPage) 
		SetWindowText (pszText); //If its the active page
	//If its not the active page, just set the tab item
	TC_ITEM ti;
	ti.mask = TCIF_TEXT;
	ti.pszText = pszText;
	VERIFY (pTab->SetItem (nPage, &ti));
	return TRUE;
}