Udostępnij za pośrednictwem


CPropertyPage::OnWizardNext

Funkcja ta Członkowskie nazywa się w ramach po kliknięciu na przycisk Dalej w kreatorze.

virtual LRESULT OnWizardNext();

Wartość zwracana

0, aby automatycznie przejść do następnej strony; -1, aby zapobiec zmienianiu przez strony.Aby przejść do następnej stronie, zwraca identyfikator okna dialogowego, które mają być wyświetlane.

Uwagi

Zastąpienie tej funkcji Członkowskich określić niektóre działania, które użytkownik musi podjąć po naciśnięciu przycisku Dalej.

Aby uzyskać więcej informacji na jak arkusz właściwości Typ kreatora, zobacz CPropertySheet::SetWizardMode.

Przykład

// 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();
}

Wymagania

Nagłówek: afxdlgs.h

Zobacz też

Informacje

Klasa CPropertyPage

Wykres hierarchii

CPropertySheet::SetWizardMode