Muokkaa

Jaa


TDM_UPDATE_ICON message

Refreshes the icon of a task dialog.

Parameters

wParam [in]

Indicates which icon element to update. This parameter must be one of the following values:

Value Meaning
TDIE_ICON_MAIN
Main icon.
TDIE_ICON_FOOTER
Footer icon.

lParam [in]

A pointer to a string (PCWSTR) or handle to an icon (HICON) to display. If lParam is NULL, no icon is displayed, regardless of the value of wParam.

If the value of wParam is TDIE_ICON_MAIN and the TDF_USE_HICON_MAIN flag is set on the dwFlags member of the TASKDIALOGCONFIG structure used to create the task dialog, lParam must contain a handle to an icon (HICON) to display.

If the value of wParam is TDIE_ICON_FOOTER and the TDF_USE_HICON_FOOTER flag is set on the dwFlags member of the TASKDIALOGCONFIG structure used to create the task dialog, lParam must contain a handle to an icon (HICON) to display.

If the TDF_USE_HICON_MAIN or TDF_USE_HICON_FOOTER flags are not set on the dwFlags member, lParam must point to a null-terminated, Unicode string (PCWSTR) that contains a valid resource identifier passed through the MAKEINTRESOURCE macro. The icon is displayed based on the value of wParam: if the value is TDIE_ICON_MAIN, the icon is displayed in the header; if the value is TDIE_ICON_FOOTER, the icon is displayed in the footer. The resource must be either from the application's resource module (specified in the hInstance member of the TASKDIALOGCONFIG structure), or if hInstance is NULL, from the system's resource module (imageres.dll). To identify a system resource, use a valid system identifier passed through the MAKEINTRESOURCE macro or one of the following predefined values from commctrl.h:

Value Meaning
TD_ERROR_ICON
A stop sign icon.
TD_WARNING_ICON
An exclamation point icon.
TD_INFORMATION_ICON
A lowercase letter "i" in a circle icon.
TD_SHIELD_ICON
A security shield icon.

Return value

The return value is ignored.

Remarks

The layout of the task dialog with the icon may fail and this may not be reflected in the return value. A return value of S_OK reflects only that the task dialog received the message and attempted to process it. If the layout of the task dialog fails, the dialog will close and an HRESULT code is returned at the registered callback function. For more information on the callback function syntax, see TaskDialogCallbackProc.

If the task dialog is created without a footer (that is, the appropriate footer members of the TASKDIALOGCONFIG structure used to create the task dialog are NULL) and this message is sent, a footer is not dynamically added to the task dialog. The same is true for sending this message to update a header icon when a task dialog is created without a header. To add a header or footer at run time, use the TDM_NAVIGATE_PAGE functionality.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Commctrl.h