From: Fabian Maurer Subject: [07/18] comctl32: TaskDialog - Center window properly Message-Id: <20170224200412.12968-7-dark.shadow4@web.de> Date: Fri, 24 Feb 2017 21:04:01 +0100 In-Reply-To: <20170224200412.12968-1-dark.shadow4@web.de> References: <20170224200412.12968-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 affdf97137..9297264ad4 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.11.1