Nikolay Sivov : comctl32/taskdialog: Use per-window dpi settings.
Alexandre Julliard
julliard at winehq.org
Tue Jul 17 15:52:37 CDT 2018
Module: wine
Branch: master
Commit: 6292c0abdcb7b710914fe731c96eff6c6c219f17
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6292c0abdcb7b710914fe731c96eff6c6c219f17
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Jul 17 14:13:06 2018 +0300
comctl32/taskdialog: Use per-window dpi settings.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 4631899..856a0b3 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;
More information about the wine-cvs
mailing list