This documentation is archived and is not being maintained.

CTaskDialog::SetVerificationCheckboxText

Sets the text that is displayed to the right of the verification check box.

void SetVerificationCheckboxText(
   CString& strVerificationText
);

[in] strVerificationText

The text that this method displays next to the verification check box.

This method throws an exception with the ENSURE (MFC) macro if this instance of the CTaskDialog Class is already displayed.


// 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
}


Header: afxtaskdialog.h

Show: