user32/button: Use per-window dpi settings.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2018-07-17 14:13:04 +03:00 committed by Alexandre Julliard
parent adeeb0dc21
commit 85d159a408
1 changed files with 2 additions and 2 deletions

View File

@ -842,8 +842,8 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
GetClientRect(hwnd, &client);
rbox = rtext = client;
checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1;
checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1;
checkBoxWidth = 12 * GetDpiForWindow( hwnd ) / 96 + 1;
checkBoxHeight = 12 * GetDpiForWindow( hwnd ) / 96 + 1;
if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont );
GetCharWidthW( hDC, '0', '0', &text_offset );