There is a CMainFrame::_InitRibbon_FileMenu()
method in the RibbonBar sample that initializes the File button. But the icon displayed on this button is initialized by the following code in the CMainFrame::_InitRibbonBar() method:
VERIFY(
m_wndRibbonBar.Ribbon_FileButtonGet() ->
m_iconForLargeMode.m_bmpNormal.
LoadBMP_Resource( MAKEINTRESOURCE( IDB_BITMAP_SMALL_ICON ) )
);
You can load any other bitmap instead of
IDB_BITMAP_SMALL_ICON
.
The last part of the
CMainFrame::_InitRibbonBar()
method performs complete initialization of the ribbon file button.
CExtRibbonNodeFile * pRibbonNodeFile = _InitRibbon_FileMenu();
m_pRibbonNode->InsertNode( NULL, pRibbonNodeFile );
m_wndRibbonBar.SetButtons( m_pRibbonNode );
VERIFY(
m_wndRibbonBar.
MenuInfoGetDefault()->
AccelTableLoad( IDR_MAINFRAME )
);
VERIFY(
m_wndRibbonBar.Ribbon_FileButtonGet() ->
m_iconForLargeMode.m_bmpNormal.
LoadBMP_Resource( MAKEINTRESOURCE( IDB_BITMAP_SMALL_ICON ) )
);
You can comment out this code to hide the File button at all. But the
CExtRibbonBar
ribbon bar control looks bad without it. Please also take a look at the
CExtRibbonPage
simplified ribbon control demonstrated in the
RibbonPage sample application. Most of applications are simple and containing commands which can be placed in one page of the ribbon bar. Such application can use the
CExtRibbonPage
simplified ribbon control instead of the
CExtRibbonBar
ribbon bar control.