Я добавил ленту в существующее приложение MFC.
Лента создается с помощью редактора.
На одной из панелей у меня есть Custom CMFCRibbonGallery (производная от), содержимое (значок) которого я меняю динамически. (Это очень похоже на галерею стилей в Excel.
- After every time I change the contents I call ForceRecalcLayout which most of the time results in an Assert usually on m_pHighlighted or m_pPressed. Please see the attached snaphot1.jpeg, this Assert happened while I was moving the mouse over the Ribbon Gallery elements (Expanded mode popup) while ForceRecalcLayout was called.
- On a different use case if I add the Sub Item (like we have "New Cell Style" in Styles Gallery of Excel) to the QAT using the context menu and then try to create a New cell style I get an Assert on the CMFCRibbonButton. Refer snapshot2.jpg