How to: Load a Ribbon Resource from an MFC Application
To use the ribbon resource in your application, modify the application to load the ribbon resource.
To load a ribbon resource
- Declare the
Ribbon Control
object in theCMainFrame
class.
CMFCRibbonBar m_wndRibbonBar;
- In
CMainFrame::OnCreate
, create and initialize the Ribbon Control.
if (!m_wndRibbonBar.Create (this))
{
return -1;
}
if (!m_wndRibbonBar.LoadFromResource(IDR_RIBBON))
{
return -1;
}
See also
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for