CPropertyPage::OnWizardNext

当用户单击向导时,的下一个按钮此成员函数由框架调用。

virtual LRESULT OnWizardNext();

返回值

自动高级0到下一页;–防止页1的更改。除了下一个外,跳转到页,则返回要显示的对话框的标识符。

备注

重写该成员函数指定用户必须执行的某些操作,如下个按钮时。

有关如何创建向导类型的属性表的更多信息,请参见 CPropertySheet::SetWizardMode

示例

// The Next button is selected from the propertysheet. Show the 
// second page of the propertysheet ONLY if a non-zero value is 
// entered to the Number edit control of the CStylePage. Otherwise
// display a message to the user and stay on the current page.

LRESULT CStylePage::OnWizardNext() 
{
   // Get the number from the edit control
   int num = GetDlgItemInt(IDC_NUMOBJECTS);

   if (num == 0)
   {
      // Display a message to the user
      AfxMessageBox(_T("Supply a non-zero number on the edit control"), MB_OK);

      // Stay on the current page
      return -1;
   }

   // CPropertyPage::OnWizardNext returns zero and causes
   // the property sheet to display the next page
   return CPropertyPage::OnWizardNext();
}

要求

Header: afxdlgs.h

请参见

参考

CPropertyPage选件类

层次结构图

CPropertySheet::SetWizardMode