次の方法で共有

Facebook x.com LinkedIn 電子メール

CTaskDialog::SetVerificationCheckboxText

確認のチェック ボックスの右側に表示されるテキストを設定します。

void SetVerificationCheckboxText(
 CString& strVerificationText
);

パラメーター

  • [入力] strVerificationText
    このメソッドにより確認のチェック ボックスの横に表示する文字列。

解説

この CTaskDialog クラスのインスタンスが既に表示されている場合、このメソッドは ENSURE (MFC) マクロによって例外をスローします。

使用例

// TODO: Replace the strings below with the appropriate message, 
// main instruction, and dialog title
CString message("This is an important message to the user.");
CString mainInstruction("Important!\nPlease read!");
CString title("Alert Dialog");
CTaskDialog taskDialog(message, mainInstruction, title, 
 TDCBF_YES_BUTTON | TDCBF_NO_BUTTON | TDCBF_CANCEL_BUTTON );
// Add the verification checkbox and set the default state.
taskDialog.SetVerificationCheckboxText(L"Remember your selection.");
taskDialog.SetVerificationCheckbox(false);
taskDialog.DoModal();
if (taskDialog.GetVerificationCheckboxState())
{
 // TODO: Write settings of the task dialog to the registry
}

必要条件

**ヘッダー:**afxtaskdialog.h

参照

参照

CTaskDialog クラス

階層図

CTaskDialog::SetVerificationCheckbox


  • Last updated on 2011年08月09日