다음을 통해 공유


CTaskDialog::SetFooterIcon

바닥글 아이콘의 업데이트는 CTaskDialog.

void SetFooterIcon(
   HICON hFooterIcon
);

void SetFooterIcon(
   LPCWSTR lpszFooterIcon
);

매개 변수

  • [in] hFooterIcon
    새 아이콘은 CTaskDialog.

  • [in] lpszFooterIcon
    새 아이콘은 CTaskDialog.

설명

바닥글 아이콘 아래에 표시 되는 CTaskDialog 클래스.바닥글 텍스트 연결 된 있을 수 있습니다.바닥글 텍스트를 변경할 수 있습니다 CTaskDialog::SetFooterText.

이 메서드는 예외를 throw는 (MFC)를 확인 합니다. 매크로 경우는 CTaskDialog 표시 또는 입력 매개 변수가 NULL.

A CTaskDialog 만 받아들일 수 있는 HICON 또는 LPCWSTR 바닥글 아이콘으로.이 옵션을 설정 하 여 구성 된 TDF_USE_HICON_FOOTER 생성자에서 또는 CTaskDialog::SetOptions.기본적으로 CTaskDialog 를 사용 하도록 구성 된 LPCWSTR 바닥글 아이콘에 대 한 입력으로.잘못 된 형식을 사용 하 여 아이콘을 설정 하는 경우이 메서드는 예외가 발생 합니다.

예제

// 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 );

// Setting new information to be able to reuse the dialog resource
taskDialog.SetWindowTitle(L"New title for the task dialog");
taskDialog.SetContent(L"New message to show the user.");
taskDialog.SetMainInstruction(L"Even more important!");
taskDialog.SetMainIcon(TD_ERROR_ICON);
taskDialog.SetDialogWidth(300);

// Add a footer
taskDialog.SetFooterText(L"Footer information for the dialog.");
taskDialog.SetFooterIcon(TD_INFORMATION_ICON);

// Add expansion information
taskDialog.SetExpansionArea(L"Additional information\non two lines.",
    L"Click here for more information.",
    L"Click here to hide the extra information.");

// Change the options to show the expanded information by default.
// It is necessary to retrieve the current options first.
int options = taskDialog.GetOptions();
options |= TDF_EXPANDED_BY_DEFAULT;
taskDialog.SetOptions(options);

taskDialog.DoModal();

요구 사항

헤더: afxtaskdialog.h

참고 항목

참조

CTaskDialog 클래스

계층 구조 차트

CTaskDialog::CTaskDialog

CTaskDialog::SetFooterText