comctl32/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:05 +03:00 committed by Alexandre Julliard
parent 85d159a408
commit 40298cc69a
1 changed files with 2 additions and 2 deletions

View File

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