locked
The height of toolbars(CMFCToolBar) is scaled when the scaling setting of the screen is set more than 100% RRS feed

  • Question

  • The height of toolbars(CMFCToolBar) is larger when the scaling setting of screen is set more than 100%. The toolbar button images are kept 16x16 same as the scaling is 100%, which is what I want and set in the program. Therefore each toolbar button look rectangular because the height is scaled. I wish the height of the toolbar is NOT scaled as the scaling settings change, ie same height in 100%, 125% or 150 and so on.
    Tuesday, October 2, 2018 11:18 AM

Answers

  • Hello,

    I think this is Windows/Microsoft specific. If you want your own toolbars with fixed height (and width as you ask in other postins), you should perhaps consider to follow a different approach. Maybe you can use something like a dialog toolbar?

    I use a docking toolbar which has a CDialogEx inside. I don't have problems with the sizes when the dpi changes. Have a look at the link I gave you many times in your other questions already. It is easy to implement and you have total control of the toolbar.

    https://www.codeproject.com/Articles/493218/Understanding-CDockablePane

    Regards, Guido

    • Proposed as answer by Jack Zhang - AAA Thursday, October 11, 2018 7:19 AM
    • Marked as answer by Yan Yang Thursday, October 11, 2018 8:14 AM
    Tuesday, October 2, 2018 12:03 PM