BCGSoft > Developer Area > Getting Started

Getting Started

This article describes how to convert your existing MFC application to BCGControlBar Pro (if you wish to create a new, fresh application, please use our Application Wizard). Let's imagine that you've a more-less typical MFC application with menu, some toolbars and status bar. Please make the following changes in your source code:
  • Add the following include to the stdafx.h file:
#include "BCGCBProInc.h"
The required library will be automatically linked with your project - you don't have to add it in the project linker settings. We assume that our Integration Wizard (launched in the end of the product installation) has been completed properly and your Visual Studio C++ folder lists already include BCGControlBar Pro directories (both INCLUDE and LIBRARY).
  • Derive your application class from CBCGPWinApp:
class CMyApp : public CBCGPWinApp
  • Make sure, that you call CBCGPWinApp::InitInstance() and AfxOleInit() in your application InitInstance()

  • Add the following call to InitInstance(): SetRegistryKey(_T("MyCompany\\MyProduct"));
  • Add a call to BCGCBProCleanUp() in your application ExitInstance()
  • Make the following global substitutions for the class names:
    1. CFrameWnd -> CBCGPFrameWnd
    2. CMDIFrameWnd -> CBCGPMDIFrameWnd
    3. CMDIChildWnd -> CBCGPMDIChildWnd
    4. CToolBar -> CBCGPToolBar
    5. CStatusBar ->CBCGPStatusBar.
  • If you wish to add Microsoft Office 2007/2010/2013/2016-style Ribbon Bar, please read the following articles to learn this technology:
    1. Office-style Ribbon Bar
    2. Ribbon Backstage View - Walkthrough
    3. Ribbon Designer
  • Add the embedded menu bar object into your CMainFrame class: CBCGPMenuBar m_wndMenuBar and create it in CMainFrame::OnCreate:
  • Set the application visual style at the beginning of your application constructor:


    where the theme is:
    BCGP_VISUAL_THEME_DEFAULT Windows native theme
    BCGP_VISUAL_THEME_OFFICE_2000 MS Office 2000/VC++ 6.0 look
    BCGP_VISUAL_THEME_OFFICE_XP MS Office XP/Visual Studio.NET look
    BCGP_VISUAL_THEME_OFFICE_2003 MS Office 2003 look
    BCGP_VISUAL_THEME_VS_2005 Visual Studio 2005 look
    BCGP_VISUAL_THEME_OFFICE_2007_BLUE MS Office 2007 look (blue)
    BCGP_VISUAL_THEME_OFFICE_2007_BLACK MS Office 2007 look (black)
    BCGP_VISUAL_THEME_OFFICE_2007_SILVER MS Office 2007 look (silver)
    BCGP_VISUAL_THEME_OFFICE_2007_AQUA MS Office 2007 look (aqua)
    BCGP_VISUAL_THEME_VS_2008 Visual Studio 2008 look
    BCGP_VISUAL_THEME_VS_2010 Visual Studio 2010 look
    BCGP_VISUAL_THEME_OFFICE_2010_BLUE MS Office 2010 look (blue)
    BCGP_VISUAL_THEME_OFFICE_2010_BLACK MS Office 2010 look (black)
    BCGP_VISUAL_THEME_OFFICE_2010_SILVER MS Office 2010 look (silver)
    BCGP_VISUAL_THEME_SCENIC Windows 7/8 Ribbon look.
    BCGP_VISUAL_THEME_VS_2012_LIGHT Visual Studio 2012 look (light)
    BCGP_VISUAL_THEME_VS_2012_DARK Visual Studio 2012 look (dark)
    BCGP_VISUAL_THEME_VS_2012_BLUE Visual Studio 2012 look (blue)
    BCGP_VISUAL_THEME_OFFICE_2013_WHITE MS Office 2013 look (white)
    BCGP_VISUAL_THEME_OFFICE_2013_GRAY MS Office 2013 look (gray)
    BCGP_VISUAL_THEME_OFFICE_2013_DARK_GRAY MS Office 2013 look (dark gray)
    BCGP_VISUAL_THEME_OFFICE_2016_WHITE MS Office 2016 look (white)
    BCGP_VISUAL_THEME_OFFICE_2016_COLORFUL MS Office 2016 look (colorful)
    BCGP_VISUAL_THEME_OFFICE_2016_DARK_GRAY MS Office 2016 look (dark gray)

Back to the Developer Area