[PATCH] comctl32/taskdialog: Use per-window dpi settings.
Nikolay Sivov
nsivov at codeweavers.com
Tue Jul 17 06:13:06 CDT 2018
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/comctl32/taskdialog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c
index 463189954e..856a0b39bf 100644
--- a/dlls/comctl32/taskdialog.c
+++ b/dlls/comctl32/taskdialog.c
@@ -316,8 +316,8 @@ static void taskdialog_get_radio_button_size(struct taskdialog_info *dialog_info
hfont = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0);
old_hfont = SelectObject(hdc, hfont);
- radio_box_width = 12 * GetDeviceCaps(hdc, LOGPIXELSX) / 96 + 1;
- radio_box_height = 12 * GetDeviceCaps(hdc, LOGPIXELSY) / 96 + 1;
+ radio_box_width = 12 * GetDpiForWindow(hwnd) / 96 + 1;
+ radio_box_height = 12 * GetDpiForWindow(hwnd) / 96 + 1;
GetCharWidthW(hdc, '0', '0', &text_offset);
text_offset /= 2;
--
2.18.0
More information about the wine-devel
mailing list