// A CPropertySheet has three wizard property pages: CStylePage,
// CColorPage, and CShapePage. The code fragment below shows how to
// enable and disable the Back and Next buttons on the wizard
// property page.
// CStylePage is the first wizard property page. Disable the Back
// button but enable the Next button.
BOOL CStylePage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_NEXT);
// CColorPage is the second wizard property page. Enable both the
// Back button and the Next button.
BOOL CColorPage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
CWnd *pWnd=psheet->GetDlgItem(ID_YOUR_NEXTBUTTON);
if(pWnd!=NULL)
pWnd->SetWindowText("Go");
return CPropertyPage::OnSetActive();
}
// CShapePage is the third wizard property page. Enable the Back
// button and change the Next button to Finish. If dwFlags is equal
// to PSWIZB_BACK | PSWIZB_DISABLEDFINISH, then the Back
// button is enabled but the Next button is disabled.
BOOL CShapePage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);