Partager via


CPropertyPage::OnWizardBack

This member function is called by the framework when the user clicks on the Back button in a wizard.

virtual LRESULT OnWizardBack();

Return Value

0 to automatically advance to the next page; –1 to prevent the page from changing. To jump to a page other than the next one, return the identifier of the dialog to be displayed.

Remarks

Override this member function to specify some action the user must take when the Back button is pressed.

For more information on how to make a wizard-type property sheet, see CPropertySheet::SetWizardMode.

Example

// The Back button is selected from the propertysheet.  Get the selected  
// radio button of the page by looping through all buttons on the  
// pages.  m_radioColor is a member variable of  
// CColorPage (a CPropertyPage-derived class).  Its initial value  
// is initialized in OnInitDialog().
LRESULT CColorPage::OnWizardBack() 
{
   for (int id = IDC_RADIOBLACK; id <= IDC_RADIOGREEN; id++) 
   {
      CButton* button = (CButton*) GetDlgItem(id);
      if (button->GetCheck() == 1)
      {
         m_radioColor = id - IDC_RADIOBLACK;
         break;
      }
   }

   return CPropertyPage::OnWizardBack();
}

Requirements

Header: afxdlgs.h

See Also

Reference

CPropertyPage Class

Hierarchy Chart

CPropertySheet::SetWizardMode