Search code examples
c++windowswinapiribbonwindows-ribbon-framework

Why is the Ribbon UI disappearing when I resize my app window horizontally?


I wanted to adopt the Ribbon UI for my new project, I know it might be focusing more on the WoW factor than the true use of a Ribbon which is to replace the toolbar clutter. However when I started playing around with resizing the window, checking out some of the features related to automated scaling. After shrinking the window than a minimum width in size the Ribbon UI just disappeared, I even thought this might not exist in commercial software that have already adopted the Ribbon UI. Paint seems to be suffering from the same problem, don't know if Office 2007 or 2010 are also plagued by the same problem.


Solution

  • Paint and the other built-in Windows applications use the scenic Ribbon API that Microsoft is now including in the OS for all developers to use. Presumably, this is the same one you're using for your project. Microsoft Office uses proprietary ribbon controls, invented by the Office team in-house. That explains the difference in behavior.

    And yes, it hardly shocks me that the ribbon disappears entirely when you make the window too small for it to appear. Eye candy has that way about it. Consider that the ribbon isn't very useful or functional when there isn't enough space to display its massive buffet of options. You can see that it tries to shrink itself down as much as possible, but you just can't fit 10 pounds in a 5 pound bag. Hiding it altogether seems like just as elegant an option as anything else.