How can add a "Collapse the Ribbon" button to a CMFCRibbonBar

279 views Asked by At

I'm using CMFCRibbonBar in an MFC based Application, I would like to add the ability to collapse the ribbon like you can in Office, does anyone know if this can be done?

image of ribbon bar in office

I would be quite happy if I it was only possible to implement the button in the menu bar like in explorer/mspaint

windows 10 explorer view

1

There are 1 answers

2
MyDeveloperDay On

Sorry to answer my own question, seems you just drop a CMFCRibbonButton above the ribbon bar, give it an id, then in the event handler call

m_wndRibbonBar.ToggleMimimizeState();

Now to determine how I can change the button image on toggling