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