次の方法で共有


CPropertyPage::OnWizardNext

更新 : 2007 年 11 月

ウィザードで、ユーザーが [次へ] をクリックしたときに、フレームワークが呼び出します。

virtual LRESULT OnWizardNext();

戻り値

自動的に次ページに移動する場合は、0 を返します。改ページをしない場合は、-1 を返します。次ページ以外のページに移動する場合は、表示するダイアログ ボックスの ID を返します。

解説

[次へ] ボタンがクリックされたときに、ユーザーが動作を行うようにするには、このメンバ関数をオーバーライドします。

ウィザード型のプロパティ シートの作成方法の詳細については、「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();
}

必要条件

ヘッダー : afxdlgs.h

参照

参照

CPropertyPage クラス

階層図

CPropertySheet::SetWizardMode

その他の技術情報

CPropertyPage のメンバ