BCGSoft > Products > Product feature tour

Product feature tour

Context | First | Prev | Next | Last
Fully implemented BCGControlBar Pro (MFC)
Not available BCGSuite (MFC)
Fully implemented BCGControlBar (Microsoft .NET)

Ribbon Main (Application) Button ("Perl")

The Microsoft Office-style Ribbon Main Button (CBCGPRibbonMainButton) is a special button located at the left top corner of application window and displays a menu, which usually contains "File" commands like Open, Save, Exit.

In addition, the application menu has recent files list and search box.

Office 2007-style Application Button:


Windows 7-style Application Button with a Search Box:


Sample code:
CBCGPRibbonMainButton   m_MainButton;
...
m_MainButton.SetImage (IDB_MAIN); // Suggested size is 26 x 26 pixels
m_MainButton.SetToolTipText (_T("File"));

m_wndRibbonBar.SetMainButton (&m_MainButton, CSize (45, 45));

CBCGPRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory (
    _T("File"), IDB_FILESMALL, IDB_FILELARGE);

pMainPanel->Add (new CBCGPRibbonButton (ID_FILE_NEW, _T("New"), 0, 0));
pMainPanel->Add (new CBCGPRibbonButton (ID_FILE_OPEN, _T("Open..."), 1, 1));

pMainPanel->Add (new CBCGPRibbonButton (ID_FILE_SAVE, _T("Save"), 2, 2));

pMainPanel->Add (new CBCGPRibbonButton (ID_FILE_SAVE_AS, _T("Save As..."), 3, 3));

CBCGPRibbonButton* pBtnPrint = new CBCGPRibbonButton (ID_FILE_PRINT, _T("Print"), 6, 6);

pBtnPrint->AddSubItem (new CBCGPRibbonLabel (_T("Preview and print the document")));
pBtnPrint->AddSubItem (new CBCGPRibbonButton (ID_FILE_PRINT_DIRECT, _T("Quick Print"), 6, 6, TRUE));
pBtnPrint->AddSubItem (new CBCGPRibbonButton (ID_FILE_PRINT_PREVIEW, _T("Print Preview"), 12, 12, TRUE));

pMainPanel->Add (pBtnPrint);

pMainPanel->Add (new CBCGPRibbonSeparator (TRUE));
pMainPanel->Add (new CBCGPRibbonButton (ID_FILE_CLOSE, _T("Close"), 7, 7));

pMainPanel->AddRecentFilesList (_T("Recent Documents"));

pMainPanel->AddToBottom (new CBCGPRibbonMainPanelButton (ID_APP_EXIT, _T("Exit"), 9));
Prev  Next