How to refresh the CMFCRibbonBar after adding/updating an item

2.4k views Asked by At

After adding a ribbon item, or calling a method that updates an item, the ribbon does not refresh correctly. Sometimes it's OK after resizing the window but most of the time the panel is in a collapsed state.

I tried all the functions I could think of, ReposPanels, RecalcWidths, RecalcLayout etc etc but nothing worked...

1

There are 1 answers

0
demoncodemonkey On BEST ANSWER

This worked for me:

    m_ribbonBar.ForceRecalcLayout(); //CMFCRibbonBar m_ribbonBar;