From: Zhiyi Zhang yi.gd.cn@gmail.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/taskdialog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 1ab9e133da..4db487957c 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -558,15 +558,17 @@ static INT_PTR CALLBACK taskdialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPAR if (HIWORD(wParam) == BN_CLICKED) { taskdialog_on_button_click(dialog_info, LOWORD(wParam)); - return TRUE; + break; } - break; + return FALSE; case WM_DESTROY: taskdialog_notify(dialog_info, TDN_DESTROYED, 0, 0); RemovePropW(hwnd, taskdialog_info_propnameW); break; + default: + return FALSE; } - return FALSE; + return TRUE; }
/***********************************************************************
From: Zhiyi Zhang yi.gd.cn@gmail.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/taskdialog.c | 3 +++ dlls/comctl32/tests/taskdialog.c | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+)
diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 4db487957c..ae8e94d992 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -561,6 +561,9 @@ static INT_PTR CALLBACK taskdialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPAR break; } return FALSE; + case WM_HELP: + taskdialog_notify(dialog_info, TDN_HELP, 0, 0); + break; case WM_DESTROY: taskdialog_notify(dialog_info, TDN_DESTROYED, 0, 0); RemovePropW(hwnd, taskdialog_info_propnameW); diff --git a/dlls/comctl32/tests/taskdialog.c b/dlls/comctl32/tests/taskdialog.c index 3fcc634e07..ad455554b2 100644 --- a/dlls/comctl32/tests/taskdialog.c +++ b/dlls/comctl32/tests/taskdialog.c @@ -121,6 +121,26 @@ static const struct message_info msg_return_press_custom10[] = { 0 } };
+static const struct message_info msg_send_click_ok[] = +{ + { TDM_CLICK_BUTTON, IDOK, 0 }, + { 0 } +}; + +static const struct message_info msg_send_f1[] = +{ + { WM_KEYF1, 0, 0, 0}, + { 0 } +}; + +static const struct message_info msg_got_tdn_help[] = +{ + { TDN_CREATED, 0, 0, S_OK, msg_send_f1 }, + { TDN_HELP, 0, 0, S_OK, msg_send_click_ok }, + { TDN_BUTTON_CLICKED, IDOK, 0, S_OK, NULL }, + { 0 } +}; + static void init_test_message(UINT message, WPARAM wParam, LPARAM lParam, struct message *msg) { msg->message = WM_TD_CALLBACK; @@ -291,6 +311,18 @@ static void test_buttons(void) run_test(&info, ID_START_BUTTON + 3, msg_return_press_custom4, "default button: valid default - 2"); }
+static void test_help(void) +{ + TASKDIALOGCONFIG info = {0}; + + info.cbSize = sizeof(TASKDIALOGCONFIG); + info.pfCallback = taskdialog_callback_proc; + info.lpCallbackData = test_ref_data; + info.dwCommonButtons = TDCBF_OK_BUTTON; + + run_test(&info, IDOK, msg_got_tdn_help, "send f1"); +} + START_TEST(taskdialog) { ULONG_PTR ctx_cookie; @@ -327,6 +359,7 @@ START_TEST(taskdialog) test_invalid_parameters(); test_callback(); test_buttons(); + test_help();
unload_v6_module(ctx_cookie, hCtx); }
From: Zhiyi Zhang yi.gd.cn@gmail.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/taskdialog.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index ae8e94d992..ef90efcc8d 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -488,6 +488,7 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi }
template->style = DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_VISIBLE | WS_SYSMENU; + if (taskconfig->dwFlags & TDF_CAN_BE_MINIMIZED) template->style |= WS_MINIMIZEBOX; template->cdit = desc.control_count; template->x = (ref_rect.left + ref_rect.right + desc.dialog_width) / 2; template->y = (ref_rect.top + ref_rect.bottom + desc.dialog_height) / 2;