Skip Navigation LinksBCGSoft > Support > Developer Area > Multiple top-level documents support

Multiple top-level documents support

The multiple top-level document interface is an UI that you can see in MS Office applications (such as MS Word or PowerPoint). In this type of application, when the user clicks "New Frame" on the File menu (or Ribbon Backstage view), the application creates a top-level frame window that hosts a new view.

BCGControlBar Pro for MFC provides the following additions, allowing you to keep all frame windows synchronized:

  • Toolbar customization: when the user opens toolbar customization dialog, all other frames become disabled, and the user can customize toolbars or menu bar in the current frame only. When the customization is finished, the toolbar state is copied to other frames. In addition, when the user changes the toolbar layout by holding the Alt key and dragging buttons, the layout will be automatically synced across all frame windows.
  • Ribbon bar customization: when the user starts the ribbon customization, all other frames become disabled. When the customization is finished, the ribbon state (including QAT location, options and content) is copied to the other frames.
  • Keyboard customization: if the keyboard accelerator table is modified in the active frame window, the framework will automatically copy it to other frames.

Updating existing application source code:

  • In your application class constructor (derived from CBCGPWinApp), specify the command ID associated with new frame creation (usually ID_FILE_NEW_FRAME):
    m_nFileNewFrameCommandID = ID_FILE_NEW_FRAME;
  • If you wish to automatically synchronize control bar states between all frames, please set the following on the next line:
    m_bAutoSyncControlBarsStateBetweenFrames = TRUE;

Back to the Developer Area