1

I am using visual studio 2010 professional edition. I am working on MFC dialog based application.

I have created the ribbon resource and try to load the same using the following:-

m_wndRibbonBar.Create(this);
m_wndRibbonBar.LoadFromResource(IDR_RIBBON);

Where CMFCRibbonBar m_wndRibbonBar is declared in the header file as well.

But I can't create the same in dialog based application, it will work in SDI or MDI application.

I would like to create the ribbon control in a dialog based application.

Is there any possibility to do so, if not, what are the alternatives for the same?

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
Searching
  • 31
  • 5
  • Several searches with Google will show you that sadly the ribbon will not work with a dialog app framework. Only in SDI and MDI. You are stuck with standard toolbars. – Andrew Truckle Feb 06 '20 at 13:49
  • See: https://stackoverflow.com/questions/12791279/ribbon-in-a-dialog-based-project-c – Andrew Truckle Feb 06 '20 at 13:51
  • See: https://social.msdn.microsoft.com/Forums/en-US/e57bdc73-a7f3-4977-897b-feb54b76f91b/ribbon-control-in-mfc-dialog-based-application?forum=vcgeneral – Andrew Truckle Feb 06 '20 at 13:52

1 Answers1

0

As answered elsewhere on the internet, for example:

ribbon control in mfc dialog based application

To quote:

According to the MSDN documentation:

Ribbons cannot be created in dialog-based applications. For more information, see see Application Type, MFC Application Wizard.

snapshot

Possible workarounds:

  • To use a Ribbon, use an SDI application with a View derived from CFormView.
  • Use a toolbar instead.
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164