Huw Davies huw@codeweavers.com wrote:
- checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1;
- checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1;
Are you sure that user32 is really supposed to scale the buttons? Could that be that it's only new comctl32 implementation should do this kind of thing? Scaling the buttons has the potential of completely distorting the dialog layout, and I really would like to see some tests for this behaviour (even a standalone application would be acceptable).
On 22 Aug 2016, at 09:34, Dmitry Timoshkov dmitry@baikal.ru wrote:
Huw Davies huw@codeweavers.com wrote:
- checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1;
- checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1;
Are you sure that user32 is really supposed to scale the buttons? Could that be that it's only new comctl32 implementation should do this kind of thing? Scaling the buttons has the potential of completely distorting the dialog layout, and I really would like to see some tests for this behaviour (even a standalone application would be acceptable).
Yes, I’m sure. It’s pretty difficult to write a non-interactive test short of comparing bits in a bitmap. Here’s a very simple test I was using to do this visually. You’ll want to ensure that the ‘Use Windows XP style DPI scaling’ box remains checked when you change the resolution, otherwise Windows will do its horrible auto-scaling thing which will confuse the situation (as well as making everything blurry!).
Huw.
Huw Davies huw@codeweavers.com wrote:
On 22 Aug 2016, at 09:34, Dmitry Timoshkov dmitry@baikal.ru wrote:
Huw Davies huw@codeweavers.com wrote:
- checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1;
- checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1;
Are you sure that user32 is really supposed to scale the buttons? Could that be that it's only new comctl32 implementation should do this kind of thing? Scaling the buttons has the potential of completely distorting the dialog layout, and I really would like to see some tests for this behaviour (even a standalone application would be acceptable).
Yes, I’m sure. It’s pretty difficult to write a non-interactive test short of comparing bits in a bitmap. Here’s a very simple test I was using to do this visually. You’ll want to ensure that the ‘Use Windows XP style DPI scaling’ box remains checked when you change the resolution, otherwise Windows will do its horrible auto-scaling thing which will confuse the situation (as well as making everything blurry!).
Thanks, I tested under XP to eliminate the auto-scaling factor, and it appeears that you are correct: Windows scales the buttons according to current DPI setting.