Condividi tramite


CPropertyPage::OnWizardNext

Questa funzione membro viene chiamata dal framework quando l'utente fa clic sul pulsante successivo in una procedura guidata.

virtual LRESULT OnWizardNext();

Valore restituito

0 automaticamente per passare alla pagina successiva, – 1 per impedire la pagina da modificare. Per passare a una pagina diversa da quella seguente, restituisce l'identificatore della finestra di dialogo da visualizzare.

Note

Eseguire l'override della funzione membro per specificare i qualche azione che l'utente deve accettare al pulsante successivo viene premuto.

Per ulteriori informazioni su come creare una finestra delle proprietà di procedura guidata- tipo, vedere CPropertySheet::SetWizardMode.

Esempio

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

Requisiti

Header: afxdlgs.h

Vedere anche

Riferimenti

Classe CPropertyPage

Grafico delle gerarchie

CPropertySheet::SetWizardMode