comctl32/taskdialog: Move TASKDIALOGCONFIG pointer in struct taskdialog_info.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
407fd270a3
commit
1c6e1ff807
@ -84,8 +84,7 @@ struct taskdialog_template_desc
|
|||||||
struct taskdialog_info
|
struct taskdialog_info
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
PFTASKDIALOGCALLBACK callback;
|
const TASKDIALOGCONFIG *taskconfig;
|
||||||
LONG_PTR callback_data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void pixels_to_dialogunits(const struct taskdialog_template_desc *desc, LONG *width, LONG *height)
|
static void pixels_to_dialogunits(const struct taskdialog_template_desc *desc, LONG *width, LONG *height)
|
||||||
@ -520,8 +519,10 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi
|
|||||||
|
|
||||||
static HRESULT taskdialog_notify(struct taskdialog_info *dialog_info, UINT notification, WPARAM wparam, LPARAM lparam)
|
static HRESULT taskdialog_notify(struct taskdialog_info *dialog_info, UINT notification, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
return dialog_info->callback ? dialog_info->callback(dialog_info->hwnd, notification, wparam, lparam,
|
const TASKDIALOGCONFIG *taskconfig = dialog_info->taskconfig;
|
||||||
dialog_info->callback_data) : S_OK;
|
return taskconfig->pfCallback
|
||||||
|
? taskconfig->pfCallback(dialog_info->hwnd, notification, wparam, lparam, taskconfig->lpCallbackData)
|
||||||
|
: S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void taskdialog_on_button_click(struct taskdialog_info *dialog_info, WORD command_id)
|
static void taskdialog_on_button_click(struct taskdialog_info *dialog_info, WORD command_id)
|
||||||
@ -590,8 +591,7 @@ HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *taskconfig, int *butto
|
|||||||
if (!taskconfig || taskconfig->cbSize != sizeof(TASKDIALOGCONFIG))
|
if (!taskconfig || taskconfig->cbSize != sizeof(TASKDIALOGCONFIG))
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
dialog_info.callback = taskconfig->pfCallback;
|
dialog_info.taskconfig = taskconfig;
|
||||||
dialog_info.callback_data = taskconfig->lpCallbackData;
|
|
||||||
|
|
||||||
template = create_taskdialog_template(taskconfig);
|
template = create_taskdialog_template(taskconfig);
|
||||||
ret = (short)DialogBoxIndirectParamW(taskconfig->hInstance, template, taskconfig->hwndParent,
|
ret = (short)DialogBoxIndirectParamW(taskconfig->hInstance, template, taskconfig->hwndParent,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user