BCGControlBar Pro for MFC
CBCGPOutlookBarPane

Detailed Description

The CBCGPOutlookBarPane class extends the functionality of CBCGPToolBar in the way that allows it to be inserted into outlook bar as a page.

CBCGPOutlookBarPane objects preserve the customization features of toolbars.

CBCGPOutlookBarPane has the following features:

  • Add and remove buttons
  • Set background image
  • Set background color
  • The buttons may be scrolled up and down

To use CBCGPOutlookBarPane in application you need the following:

  • Create an instance of the CBCGPOutlookBarPane object
  • Call Create().
  • Setup the pane adding the buttons (call AddButton() method)
  • Enable docking if you intend to make the pane detachable and dock it at another side of the main frame window.
  • Add the pane to the outlook bar.

Example (error handling is skipped):

Copy
class CMainFrame : public CBCGPMDIFrameWnd
{
.....
CBCGPOutlookBar m_wndOutlookBar;
CBCGPOutlookBarPane m_wndOutlookPane;
......
};
// create the outlook bar:
m_wndOutlookBar.Create(_T("Shortcuts"), this, CRect(0, 0, 100, 100), ID_VIEW_OUTLOOKBAR, WS_CHILD | WS_VISIBLE | CBRS_LEFT);
// obtain the pointer to underlined outlook window
CBCGPOutlookWnd* pOutlookBar = (CBCGPOutlookWnd*) m_wndOutlookBar.GetUnderlinedWindow();
// create the outlook pane
m_wndOutlookPane.Create(&m_wndOutlookBar, dwDefaultToolbarStyle, ID_OUTLOOK_PANE_GENERAL, CBRS_BCGP_RESIZE);
// set main frame window as the owner to receive the commands from the pane
m_wndOutlookPane.SetOwner (this);
m_wndOutlookPane.EnableTextLabels();
// add buttons
m_wndOutlookPane.AddButton(theApp.LoadIcon (IDR_MAINFRAME), _T("About"), ID_APP_ABOUT);
m_wndOutlookPane.AddButton (theApp.LoadIcon (IDR_BCGCBDTYPE), _T("Open"), ID_FILE_OPEN);
// finally add the pane to the outlook bar
pOutlookBar->AddTab (&m_wndOutlookPane, "General", (UINT) -1, TRUE);
+ Inheritance diagram for CBCGPOutlookBarPane:

Public Types

enum  ButtonFullRowWidth
 

Public Member Functions

 AddButtonInserts a button into an outlook bar's page.
 
 AddButtonInserts a button into an outlook bar's page.
 
 AddButtonInserts a button into an outlook bar's page.
 
 AddButtonInserts a button into an outlook bar's page.
 
 AddButtonInserts a button into an outlook bar's page.
 
 CreateCreates the outlook bar pane control and attaches it to the CBCGPOutlookBarPane object.
 
 EnablePageScrollModeEnables or disables a mode when the shortcuts may be scrolled page by page.
 
 GetButtonFullRowWidthTells whether the button occupies full row.
 
 GetFirstVisibleButtonReturns index of the first visible button.
 
 GetRegularColorReturns an outlook bar's regular (non-selected) text color.
 
 IsBackgroundTextureReturns nonzero if there is at least one background image loaded for the outlook bar pane.
 
 IsDrawShadedHighlightReturns nonzero if the border of outlook bar buttons should be shaded when a button is highlighted and a background image is displayed.
 
 RemoveAllButtonsRemoves all the buttons from this outlook bar pane.
 
 RemoveButtonRemoves a button from an outlook bar's page.
 
 SetBackColorSets the outlook bar pane's background color.
 
 SetBackImageSets background image.
 
 SetButtonFullRowWidthSpecifies whether the button occupies full row.
 
 SetFirstVisibleButtonScrolls the pane to specific button.
 
 SetTextColorSets the text color of an outlook bar pane control.
 
 SetTransparentColorSets the transparent color of an outlook bar pane control.
 
- Public Member Functions inherited from CBCGPToolBar
 AdjustLayoutRecalculates and adjusts the size and location of a toolbar.
 
 AllowChangeTextLabelsReturns nonzero if the toolbar object permits to display text labels below images on the toolbar buttons.
 
 AreTextLabelsTells whether toolbar buttons should display text labels below images.
 
 ButtonToIndexGiven a pointer to CBCGPToolbarButton object returns the button's index.
 
 CanBeClosedReturns nonzero if the toolbar can be closed by the user.
 
 CommandToIndexGiven a toolbar button's command ID returns the button's index.
 
 CreateCreates the control bar control and attaches it to a CBCGPToolBar object.
 
 CreateExCreates a CBCGPToolBar object with additional styles.
 
 EnableCustomizeButtonEnables or disables an additional "customize" button on the toolbar.
 
 EnableCustomizeButtonEnables or disables an additional "customize" button on the toolbar.
 
 EnableLargeIconsEnables and disables large icons (images) on toolbar buttons.
 
 EnableTextLabelsEnables and disables text labels below toolbar button's images.
 
 GetAllButtonsGives read-only access to the internal list of toolbar buttons.
 
 GetButtonGiven an index returns a toolbar button.
 
 GetButtonInfoGiven an index of toolbar button, returns an information about this button.
 
 GetButtonSizeReturns the current size of a toolbar's buttons.
 
 GetButtonStyleReturns a style of a toolbar button.
 
 GetButtonTextReturns a text label of a toolbar button.
 
 GetButtonTextReturns a text label of a toolbar button.
 
 GetColumnWidthReturns the width of toolbar buttons.
 
 GetCountReturns a number of buttons on a toolbar.
 
 GetGrayDisabledButtonsTells whether the images of the toolbar's disabled buttons should be grayed out or taken from the collection of disabled images.
 
 GetHighlightedButtonReturns a highlighted toolbar button.
 
 GetHotBorderTells whether the border presentation appears or not.
 
 GetHwndLastFocusReturns a handle to window that previously had the input focus.
 
 GetImageSizeRetrieves the size of toolbar images.
 
 GetImagesOffsetRetrieves the offset of the toolbar images in the shared (global) collection of toolbar images.
 
 GetItemIDGiven a toolbar button's index retrieves the button's command ID.
 
 GetItemRectGiven a toolbar button's index returns the button's bounding rectangle.
 
 GetRouteCommandsViaFrameDetermines whether the toolbar commands are routed via its direct owner (if not NULL) or via the parent frame.
 
 GetRowHeightReturns the height of toolbar buttons.
 
 HideEmptyMenusSpecifies whether toolbar/menu bar items with an empty items should be hidden.
 
 HitTestDetermines which toolbar button is at a specified position.
 
 InsertButtonInserts a button into list of toolbar buttons.
 
 InsertSeparatorInsets the separator at a specified position.
 
 IsButtonExtraSizeAvailableDetermines whether the toolbar can display buttons with the extra border size.
 
 IsHideEmptyMenusTells whether toolbar/menu bar items with an empty items should be hidden.
 
 IsToolBarImagesInDropDownMenusTells whether toolbar images should be displayed in drop-down menus.
 
 IsUserDefinedDetermines whether a toolbar is the user-defined toolbar.
 
 LoadBitmapLoads toolbar images from the application resources.
 
 LoadBitmapExLoads toolbar images from the application resources including large images.
 
 LoadStateLoads a toolbar state from the Windows registry.
 
 LoadToolBarLoads toolbar from the resources.
 
 LoadToolBarExLoads toolbar images from the resources using CBCGPToolBarParams helper that allows to handle large images.
 
 OnChangeHotCalled when a toolbar's currently selected button is about to change.
 
 OnCreateButtoncalled by the framework to create a toolbar button or control from the XML node.
 
 OnFillBackgroundCalled when a toolbar's background has been filled.
 
 OnResetCalled when a toolbar is reverted to its original state.
 
 OnSetDefaultButtonTextCalled when a toolbar button's default text is being restored.
 
 OnUserToolTipCalled when a toolbar button's tooltip is about to be displayed.
 
 RemoveButtonRemoves a button from a toolbar.
 
 RemoveStateFromRegistryRemoves a toolbar's state from the Windows registry.
 
 ReplaceButtonReplaces a toolbar button with another toolbar button.
 
 ResetImagesReset all toolbar images except user-defined to the default state.
 
 SaveStateStores a toolbar's state into the Windows registry.
 
 SetButtonInfoSets properties for a toolbar button.
 
 SetButtonsRemoves existing buttons from a toolbar and inserts a collection of new buttons.
 
 SetButtonStyleSets a new style for a toolbar button.
 
 SetButtonTextSets a new text label for a toolbar button.
 
 SetGrayDisabledButtonsSets a special mode, when images of disabled buttons are grayed or taken from a collection of disabled images.
 
 SetHeightCall this function to set the height of a toolbar.
 
 SetHotBorderSets a flag indicating whether toolbar buttons are hot-tracked or not.
 
 SetLockedSizesSets the size of locked toolbar buttons and locked images.
 
 SetPermamentSets a flag indicating that a toolbar is permanent and can't be closed.
 
 SetRouteCommandsViaFrameSets a flag indicating whether the toolbar commands are routed via its direct owner (if not NULL) or via the parent frame.
 
 SetToolBarBtnTextSets a new text label to the specified toolbar button, and specifies whether the toolbar button's text and image should be displayed or not.
 
 SetUseToolBarImagesInDropDownMenusSpecifies whether toolbar images should be used in drop-down menus.
 
- Public Member Functions inherited from CBCGPControlBar
 AdjustSizeImmediateImmediately recalculates layout of a control bar.
 
 CalcInsideRectCalculates the inside rectangle of a control bar taking into account the borders and grippers.
 
 CanBeDockedDetermines whether a control bar can be docked at the specified dock bar.
 
 CanBeTabbedDocumentTells whether control bar can be converted to tabbed document.
 
 CreateCreates the Windows control bar and attaches it to the CBCGPControlBar object.
 
 CreateDefaultMiniframeCreates a mini-frame window for a control bar when it's being floated.
 
 CreateExCreates the Windows control bar and attaches it to the CBCGPControlBar object.
 
 DockControlBarDocks the control bar to a dock bar.
 
 DoesAllowSiblingBarsIndicates whether it is possible to dock another control bar at the same row where this control bar is docked.
 
 FloatControlBarMakes the control bar floating.
 
 GetBordersReturns the width of the control bar borders.
 
 GetExclusiveRowModeTells whether the control bar is in exclusive row mode or not.
 
 OnPressCloseButtonCalled by the framework when user presses the close button on control bar's caption.
 
 SetBordersSets the border values of the control bar.
 
 SetBordersSets the border values of the control bar.
 
 SetExclusiveRowModeEnables or disables the exclusive row mode.
 
 SetMiniFrameRTCSets the runtime class information about the default mini-frame window.
 
 ToggleAutoHideToggles autohide mode.
 
- Public Member Functions inherited from CBCGPBaseControlBar
 AddControlBarAdds a control bar to docking manager.
 
 AdjustDockingLayoutRedirects a call to docking manager to adjust docking layout.
 
 CanAcceptBarDetermines whether another control bar can be docked to this control bar.
 
 CanAutoHideDetermines whether the control bar can be switched to autohide mode.
 
 CanBeResizedDetermines whether this control bar can be resized.
 
 CreateExCreates a Windows control.
 
 DoesAllowDynInsertBeforeDetermines whether it is possible to dynamically insert a control bar before this control bar.
 
 EnableGripperEnables/disables the control caption (gripper).
 
 GetBarIconReturns control bar icon.
 
 GetBarStyleReturns the control bar style.
 
 GetBCGStyleReturns the library specific control bar styles.
 
 GetCaptionHeightReturns the gripper (caption) height.
 
 GetDockRowReturns a pointer to a dock bar row.
 
 GetDockSiteReturns a pointer to dock site.
 
 GetEnabledAlignmentReturns the enabled alignment.
 
 GetParentMiniFrameReturns a pointer to the parent mini-frame window.
 
 GetParentTabWndRetrieves a pointer to the parent tabbed window.
 
 HideInPrintPreviewModeTells the framework whether control bar should be hidden in print preview mode.
 
 IsDockedDetermines whether the control bar is docked or not.
 
 IsHorizontalDetermines whether the control bar is docked horizontally.
 
 IsMDITabbedTells whether control bar is placed on MDI child window as tabbed document.
 
 IsVisibleDetermines whether a control bar is visible or not.
 
 OnControlBarContextMenuCalled by the framework when it needs to build a menu with the list of control bars.
 
 OnRemoveFromMiniFrameCalled by the framework when a control bar is being removed from its parent mini-frame window.
 
 SetBarAlignmentSets the current alignment for a control bar.
 
 SetBarStyleSets a control bar style
 
 SetDockModeSets a new docking method for a control bar.
 
 ShowControlBarShows or hides a control bar.
 

Protected Member Functions

 EnableContextMenuItemsOverride to modify a context menu displayed in customization mode.
 
- Protected Member Functions inherited from CBCGPToolBar
 CalcMaxButtonHeightCalculates the maximal button height.
 
 DrawButtonCalled when a toolbar's button need to be repainted.
 
 DrawSeparatorCalled when a separator need to be repainted.
 
- Protected Member Functions inherited from CBCGPControlBar
 OnBeforeDockCalled by the framework when the control bar is about to be docked.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBCGPToolBar
 AddBasicCommandAdds a command to a list of basic commands.
 
 AddToolBarForImageCollectionLoads a bitmap with toolbar images from the resources and adds it to the collection of toolbar images.
 
 AutoGrayInactiveImagesEnables a mode when disabled images are generated automatically by the library.
 
 CleanUpImagesFrees the system resources allocated for toolbar images.
 
 EnableQuickCustomizationEnables and disables the "quick" customization of toolbars by pressing the "Alt" key and dragging a button to a new location.
 
 GetAllToolbarsGives read-only access to all toolbars in the application.
 
 GetBasicCommandsGives read-only access to the global collection of basic commands defined in the application.
 
 GetColdImagesReturns a pointer to collection of cold images.
 
 GetCommandButtonsReturns a collection of buttons with the same command ID form all the application toolbars.
 
 GetDefaultImageReturns an index of the default image for a toolbar button with the specified command ID.
 
 GetDisabledImagesReturns a pointer to collection of disabled images.
 
 GetDisabledMenuImagesReturns a pointer to collection of disabled menu images.
 
 GetHotTextColorRetrieves a text color of a toolbar button in highlighted state.
 
 GetImagesRetrieves a pointer to the collection of toolbar images.
 
 GetLargeColdImagesReturns a pointer to collection of large cold images.
 
 GetLargeDisabledImagesReturns a pointer to collection of large disabled images.
 
 GetLargeImagesReturns a pointer to collection of large images.
 
 GetMenuButtonSizeRetrieves the size of menu buttons.
 
 GetMenuImagesReturns a pointer to collection of menu images.
 
 GetMenuImageSizeRetrieves the size of menu images.
 
 GetShowTooltipsDetermines whether tool tips are shown for toolbar buttons.
 
 GetUserImagesReturns a pointer to the global collection of user-defined toolbar images.
 
 IsAutoGrayInactiveImagesTells whether the option "automatic gray of inactive images" is enabled or disabled.
 
 IsBasicCommandDetermines whether the specified command is a basic command.
 
 IsCommandPermittedDetermines whether the command is allowed to be executed or not.
 
 IsCommandRarelyUsedDetermines whether the specified command is rarely used or not.
 
 IsCustomizeModeTells whether the framework is in the customization mode or not.
 
 IsGrayDisabledImagesTells whether the toolbar disabled images should be grayed or not.
 
 IsLargeIconsTells whether the application toolbars currently display large icons.
 
 IsLastCommandFromButtonDetermines whether the last command was sent from a toolbar button.
 
 IsLook2000Tells whether the application's GUI elements have Microsoft Office 2000 look and feel.
 
 LoadParametersLoads general (global) toolbar parameters from the Windows registry.
 
 ResetAllRestores all toolbars to an original state.
 
 ResetAllImagesResets all images.
 
 SetBasicCommandsSets basic commands.
 
 SetCommandUsageOptionsAllows to customize the appearance method of recently used menus.
 
 SetCustomizeModeSwitches the customize mode for all toolbars on and off.
 
 SetGrayDisabledImagesSpecifies whether the toolbar disabled images should be grayed or not.
 
 SetHotTextColorSets the text color for selected toolbar buttons to the specified color.
 
 SetLargeIconsSets a flag indicating whether toolbar buttons display large icons or regular icons.
 
 SetLook2000Sets a flag indicating whether the application GUI elements have Microsoft Office 2000 look and feel.
 
 SetMenuSizesSets the size of buttons and their images for toolbars working in the "menu mode".
 
 SetNonPermittedCommandsSets a list of commands, which are not allowed to be executed by the user.
 
 SetShowTooltipsTurns tool tips on and off.
 
 SetSizesSets sizes for all toolbar buttons and images.
 
 SetUserImagesSets user-defined images.
 
- Public Attributes inherited from CBCGPControlBar
 m_recentDockInfoContains the recent docking information.
 
- Static Public Attributes inherited from CBCGPToolBar
 m_bDontScaleImagesPrevents image scaling when image sizes don't match button sizes.
 
 m_bDPIAwareControlWidthsIf this global member is TRUE, toolbar control (such as combo boxes or edit boxes) widthes width will be automatically scaled according to current DPI.
 
 m_dblLargeImageRatioSpecifies the ratio for large images.
 
- Static Public Attributes inherited from CBCGPControlBar
 m_bHandleMinSizeEnables consistent handling of minimal size.
 
- Protected Attributes inherited from CBCGPToolBar
 m_bDontScaleLockedPrevents scaling of locked images when image sizes don't match button sizes.