From: Fabian Maurer Subject: [PATCH 07/18] comctl32: TaskDialog - Center window properly Message-Id: <20170225160146.32556-7-dark.shadow4@web.de> Date: Sat, 25 Feb 2017 17:01:35 +0100 In-Reply-To: <20170225160146.32556-1-dark.shadow4@web.de> References: <20170225160146.32556-1-dark.shadow4@web.de> Signed-off-by: Fabian Maurer --- dlls/comctl32/taskdialog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 20d4e1ba32..36f90b9948 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -359,10 +359,12 @@ HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *pTaskConfig, int *pnBu header.template.style = DS_MODALFRAME | WS_CAPTION | WS_VISIBLE; header.template.cdit = list_count(controls); - header.template.x = 10; - header.template.y = 10; + + /* TaskDialogs are always desktop centered */ header.template.cx = dialog_width; header.template.cy = dialog_height; + header.template.x = (desktop.right - dialog_width)/2; + header.template.y = (desktop.bottom - dialog_height)/2; /* Turn template information into a dialog template to display it */ template_data = dialog_template_create(header, controls); -- 2.12.0