Export (0) Print
Expand All

TaskDialogCallbackProc callback function

The TaskDialogCallbackProc function is an application-defined function used with the TaskDialogIndirect function. It receives messages from the task dialog when various events occur.

The PFTASKDIALOGCALLBACK type defines a pointer to this callback function. TaskDialogCallbackProc is a placeholder for the application defined function name.

Syntax


HRESULT CALLBACK TaskDialogCallbackProc(
  _In_  HWND hwnd,
  _In_  UINT uNotification,
  _In_  WPARAM wParam,
  _In_  LPARAM lParam,
  _In_  LONG_PTR dwRefData
);

Parameters

hwnd [in]

Type: HWND

Handle to the TaskDialog window. Do not continue sending messages to hwnd after the callback procedure returns from having been called with TDN_DESTROYED.

uNotification [in]

Type: UINT

One of the following notifications.

NotificationUsage
TDN_BUTTON_CLICKED Indicates that a button has been selected. The command ID of the button is specified by wParam.
TDN_CREATED Indicates that the Task Dialog has been created.
TDN_DESTROYED Indicates that the Task Dialog has been destroyed.
TDN_DIALOG_CONSTRUCTED Indicates that the Task Dialog has been created but has not been displayed yet.
TDN_EXPANDO_BUTTON_CLICKED Indicates that the exando button has been selected.
TDN_HELP Indicates that the F1 key has been pressed while the Task Dialog has focus.
TDN_HYPERLINK_CLICKED Indicates that a hyperlink has been selected. A pointer to the link text is specified by lParam.
TDN_NAVIGATED Indicates that navigation has occurred.
TDN_RADIO_BUTTON_CLICKED Indicates that a radio button has been selected. The command ID of the radio button is specified by wParam.
TDN_TIMER Indicates that the Task Dialog timer has fired. The total elapsed time is specified by wParam. You can update the progress bar by sending a TDM_SET_PROGRESS_BAR_POS message to the window specified by the hwnd parameter.
TDN_VERIFICATION_CLICKED Indicates that the Task Dialog verification check box has been selected.

 

wParam [in]

Type: WPARAM

Specifies additional notification information. The contents of this parameter depend on the value of the uNotification parameter.

lParam [in]

Type: LPARAM

Specifies additional notification information. The contents of this parameter depend on the value of the uNotification parameter.

dwRefData [in]

Type: LONG_PTR

Pointer to application specific data. This is the data pointed to by the lpCallbackData member of structure TASKDIALOGCONFIG used to create the task dialog.

Return value

Type: HRESULT

The return value is specific to the notification being processed. When responding to a button click, your implementation should return S_FALSE if the Task Dialog is not to close. Otherwise return S_OK.

Remarks

An application must register this callback function by passing its address in the pfCallback member of the TASKDIALOGCONFIG structure that is passed via pointer through TaskDialogIndirect.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Commctrl.h (include Commctrl.h)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft