CTaskDialog::SetVerificationCheckboxText

設定驗證核取方塊的右邊顯示的文字。

void SetVerificationCheckboxText(
   CString& strVerificationText
);

參數

  • [in] strVerificationText
    這個方法會驗證核取方塊旁顯示的文字。

備註

如果 CTaskDialog 類別 的這個執行個體已經顯示,這個方法會擲回。 確保 (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