Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh the CMFCRibbonBar after adding/updating an item

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...

like image 902
demoncodemonkey Avatar asked Dec 19 '25 00:12

demoncodemonkey


1 Answers

This worked for me:

    m_ribbonBar.ForceRecalcLayout(); //CMFCRibbonBar m_ribbonBar;
like image 128
demoncodemonkey Avatar answered Dec 24 '25 10:12

demoncodemonkey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!