Skip Navigation LinksBCGSoft > Support > 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). If your application is based on MFC "Feature Pack" classes:
  • Open your stdafx.h file and replace #include "afxcontrolbars.h" with #include "BCGCBProInc.h".
  • Make all required renames using the following grid: Relationship between MFC and BCGControlBar classes.
  • Clean up the application registry branch (or use a new registry path).
"Classic" MFC application. Let's imagine that you've got a more-or-less typical MFC application with a menu, some toolbars, and a 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 at the end of the product installation) has been completed properly and that 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
  • In the case of multiple top-level document interface applications, please read the following document and make the required changes to your code: Multiple top-level documents support.
  • Make sure, that you call CBCGPWinApp::InitInstance() and AfxOleInit() in your application InitInstance()
  • Add the following call to InitInstance():
    SetRegistryKey(_T("MyCompany\\MyProduct"));
  • 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 a Microsoft Office 2007-2022-style Ribbon Bar, please read the following articles to learn about this technology:
    1. Office-style Ribbon Bar
    2. Ribbon Backstage View - Walkthrough
    3. Ribbon Designer
  • Add the embedded menu bar object to your CMainFrame class: CBCGPMenuBar m_wndMenuBar, and create it in CMainFrame::OnCreate:
    m_wndMenuBar.Create(this);
    m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
    DockControlBar(&m_wndMenuBar);
  • Set the application visual style at the beginning of your application constructor:
    SetVisualTheme(theme);
    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_CARBON
    Carbon
    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
    "Scenic" (Windows 7-10) 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_VS_2013_LIGHT
    Visual Studio 2013 look (light)
    BCGP_VISUAL_THEME_VS_2013_DARK
    Visual Studio 2013 look (dark)
    BCGP_VISUAL_THEME_VS_2013_BLUE
    Visual Studio 2013 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)
    BCGP_VISUAL_THEME_OFFICE_2016_BLACK
    MS Office 2016 look (black)
    BCGP_VISUAL_THEME_VS_2019_LIGHT
    Visual Studio 2019 look (light)
    BCGP_VISUAL_THEME_VS_2019_DARK
    Visual Studio 2019 look (dark)
    BCGP_VISUAL_THEME_VS_2019_BLUE
    Visual Studio 2019 look (blue)
    BCGP_VISUAL_THEME_OFFICE_2019_WHITE
    MS Office 2019 look (white)
    BCGP_VISUAL_THEME_OFFICE_2019_COLORFUL
    MS Office 2019 look (colorful)
    BCGP_VISUAL_THEME_OFFICE_2019_DARK_GRAY
    MS Office 2019 look (dark gray)
    BCGP_VISUAL_THEME_OFFICE_2019_BLACK
    MS Office 2019 look (black)
    BCGP_VISUAL_THEME_OFFICE_2022_WHITE
    MS Office 2022 look (white)
    BCGP_VISUAL_THEME_OFFICE_2022_COLORFUL
    MS Office 2022 look (colorful)
    BCGP_VISUAL_THEME_OFFICE_2022_DARK_GRAY
    MS Office 2022 look (dark gray)
    BCGP_VISUAL_THEME_OFFICE_2022_BLACK
    MS Office 2022 look (black)
    BCGP_VISUAL_THEME_VS_2022_LIGHT
    Visual Studio 2022 look (light)
    BCGP_VISUAL_THEME_VS_2022_DARK
    Visual Studio 2022 look (dark)
    BCGP_VISUAL_THEME_VS_2022_BLUE
    Visual Studio 2022 look (blue)
Back to the Developer Area