Поделиться через


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