How to: Load a Ribbon Resource from an MFC Application

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

To use the ribbon resource in your application, modify the application to load the ribbon resource.

To load a ribbon resource

  1. Declare the Ribbon Control object in the CMainFrame class.
   CMFCRibbonBar m_wndRibbonBar;   

  1. In CMainFrame::OnCreate, create and initialize the Ribbon Control.
   if (!m_wndRibbonBar.Create (this))  
{  
   return -1;  
}  

   if (!m_wndRibbonBar.LoadFromResource(IDR_RIBBON))  
{  
   return -1;  
}  

Ribbon Designer (MFC)

Show: