BCGControlBar Pro for MFC
Localization

Localization with BCGControlBar Professional DLL version:

  1. Add the following member to your application class:
    Copy
    HINSTANCE m_hinstBCGCBRes;
  • In the application's InitInstance() add the DLL resource initialization:
    Copy
    m_hinstBCGCBRes = LoadLibrary(_T("BCGCBProRes***.dll")); // *** - language
    BCGCBProSetResourceHandle(m_hinstBCGCBRes);
  • Unload resource DLL in ExitInstance:
    Copy
    FreeLibrary(m_hinstBCGCBRes);
  • Localization with BCGControlBar Professional static library version:

    In the project's "Resource Includes" dialog (View | Resource Includes) modify

    Copy
    #include "BCGCBPro.rc"

    to

    Copy
    #include "L.***\bcgcontrolbar.rc" // *** language, e.g. #include "L.FRA\bcgcontrolbar.rc"

    How to translate the library resources to the new language?

    1. Under your BCGControlBar Professional directory, create a new subdirectory called "L.***" where "***" is a language name prefix.
    2. Copy the following files from the any other existing language directory:
    3. Copy bcgcbarres.rc (English resources) from BCGControlBar Professional directory
    4. In the Visual Studio, open bcgcbarres project
    5. Remove resource version info
    6. Change the DLL output file name to "..\..\bin\BCGCBRes***.dll" (*** - is a language name prefix)
    7. Translate dialog, string and menu resources.
    8. Build the project. Because bcgcbarres.rc has references to the common BCGControlBar Professional resources (bitmaps, icons and cursors), you'll be notified about creating a "RES" subdirectory. This is a Visual Studio resource editor problem - it doesn't interpret path obtained from the project settings in the correct way. Just answer yes and L.***\RES will be created. When the resource file is compiled (both static and DLL mode), the correct RES path (BCGCBPro dir\RES) will be taken. The language resources DLL will be placed into the BIN directory (same as BCGCB<ver>.DLL).