Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Hi res issue CXTPRibbonControlSystemPopupBarButton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hi res issue CXTPRibbonControlSystemPopupBarButton

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Hi res issue CXTPRibbonControlSystemPopupBarButton
    Posted: 21 January 2015 at 3:22pm
I'm having a heck of a time getting the ribbon to scale up properly when running at a high dpi setting when it comes to our exit and options buttons. We use CXTPRibbonControlSystemPopupBarButton for the two buttons we add side-by-side at the bottom of the system popup menu.

The problem is that we have is that the font we use on the ribbon is scaled when the user runs at a high dpi setting, say 150%. The system popup bar displays and the controls at the bottom are not large enough. Hence the text next to the icon is too tall for the space allocated. The higher the dpi setting, the worse the clipping is.

I found CXTPRibbonControlSystemPopupBarButton::GetButtonSize is hard coded to return (22,22). No big deal as the method is virtual. So I subclass and in GetButtonSize I scale the size by the DPI scale factor. So at 150%, I return (33,33). And ... no change. So I just hard coded to return (50,50). No change.

I think CXTPRibbonSystemPopupBar::CalcDynamicLayout is ignoring the height of the controls. When I step thru the code it calls pControl->SetRect(), completely ignoring the width of the height that is returned from the call to the button's GetSize() method.

Not only that, it ignores the width of the button too. So if you don't have any "wide" controls on the system menu, there is clipping in the x dimension too.

Try this. Create a ribbon with a system popup bar that only has the "app exit" and "app options" CXTPRibbonControlSystemPopupBarButtons on it (they display side-by-side). Then run and click the system button. I get a tiny little window where only a few characters of one of the controls displays.

I'm running with 16.3.1. CodeJock, do you monitor these posts? Is this issue addressed in 16.4 by any chance?
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 284
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2015 at 10:06pm
Hello,

I'm glad to inform you that the upcoming version 17.0 will have full DPI support for the majority of components, including Ribbon, Command Bars, Controls, Docking Pane, Task Panel, TabManager, Shortcut Bar, Markup, which will already be available in 17.0 beta scheduled for release in a few weeks. DPI support for other components is under development now and most likely will be added with the next update. Please stay tuned to our updates and once 17.0 beta  is out we appreciate a thorough testing and reporting the problems.

Thank you.
Regards,
  Alexander Stoyan
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.