Compartilhar via


CMFCOutlookBarPane Class

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

A control derived from CMFCToolBar Class that can be inserted into an Outlook bar (CMFCOutlookBar Class). The Outlook bar pane contains a column of large buttons. The user can scroll up and down the list of buttons if it is larger than the pane. When the user detaches an Outlook bar pane from the Outlook bar, it can float or dock in the main frame window.

class CMFCOutlookBarPane : public CMFCToolBar

Members

Public Constructors

Name

Description

CMFCOutlookBarPane::CMFCOutlookBarPane

Default constructor.

CMFCOutlookBarPane::~CMFCOutlookBarPane

Destructor.

Public Methods

Name

Description

CMFCOutlookBarPane::AddButton

Adds a button to the Outlook bar pane.

CMFCOutlookBarPane::CanBeAttached

Determines whether the pane can be docked to another pane or frame window. (Overrides CBasePane::CanBeAttached.)

CMFCOutlookBarPane::CanBeRestored

Determines whether the system can restore a toolbar to its original state after customization. (Overrides CMFCToolBar::CanBeRestored.)

CMFCOutlookBarPane::ClearAll

Frees the resources used by the images in the Outlook bar pane.

CMFCOutlookBarPane::Create

Creates the Outlook bar pane.

CMFCOutlookBarPane::CreateObject

Used by the framework to create a dynamic instance of this class type.

CMFCOutlookBarPane::Dock

Called by the framework to dock the Outlook bar pane. (Overrides CPane::Dock.)

CMFCOutlookBarPane::EnablePageScrollMode

Specifies whether the scroll arrows on the Outlook bar pane advance the list of buttons by page, or by button.

CMFCOutlookBarPane::GetRegularColor

Returns the regular (non-selected) text color of the Outlook bar pane.

CMFCOutlookBarPane::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CMFCOutlookBarPane::IsBackgroundTexture

Determines whether there is a background image loaded for the Outlook bar pane.

CMFCOutlookBarPane::IsChangeState

Determines whether a floating pane may be docked. (Overrides CPane::IsChangeState.)

CMFCOutlookBarPane::IsDrawShadedHighlight

Determines whether the button border is shaded when a button is highlighted and a background image is displayed.

CMFCOutlookBarPane::OnBeforeFloat

Called by the framework when a pane is about to float. (Overrides CPane::OnBeforeFloat.)

CMFCOutlookBarPane::RemoveButton

Removes the button that has a specified command ID.

CMFCOutlookBarPane::RestoreOriginalstate

Restores the original state of a toolbar. (Overrides CMFCToolBar::RestoreOriginalstate.)

CMFCOutlookBarPane::SetBackColor

Sets the background color.

CMFCOutlookBarPane::SetBackImage

Sets the background image.

CMFCOutlookBarPane::SetDefaultState

Resets the Outlook bar pane to the original set of buttons.

CMFCOutlookBarPane::SetExtraSpace

Sets the number of pixels of padding used around buttons in the Outlook bar pane.

CMFCOutlookBarPane::SetTextColor

Sets the colors of regular and highlighted text in the Outlook bar pane.

CMFCOutlookBarPane::SetTransparentColor

Sets the transparent color for the Outlook bar pane.

CMFCOutlookBarPane::SmartUpdate

Used internally to update the Outlook bar. (Overrides CMFCToolBar::SmartUpdate.)

Protected Methods

Name

Description

CMFCOutlookBarPane::EnableContextMenuItems

Specifies which shortcut menu items are displayed in customization mode.

CMFCOutlookBarPane::RemoveAllButtons

Removes all the buttons from the Outlook bar pane. (Overrides CMFCToolBar::RemoveAllButtons.)

Remarks

For information about how to implement an Outlook bar, see CMFCOutlookBar Class.

For an example of an Outlook bar, see the OutlookDemo sample project.

Example

The following example demonstrates how to use various methods of the CMFCOutlookBarPane class. The example shows how to create an Outlook bar pane, enable the page scroll mode, enable docking, and set the background color of the Outlook bar. This code snippet is part of the Outlook Multi Views sample.

    CMFCOutlookBarPane      m_wndShortcutsPane1;


...


    CImageList images;
    images.Create (IDB_SHORTCUTS, 32, 0, RGB (255, 0, 255));

    // Create first page:
    m_wndShortcutsPane1.Create (&m_wndShortcutsBar, AFX_DEFAULT_TOOLBAR_STYLE, ID_SHORTCUTS_PANE_1);
    // The this pointer points to a CMainFrame class which extends the CFrameWnd class
    m_wndShortcutsPane1.SetOwner (this);
    m_wndShortcutsPane1.EnableTextLabels ();
    m_wndShortcutsPane1.EnableDocking (CBRS_ALIGN_ANY);
    m_wndShortcutsPane1.EnablePageScrollMode();
    m_wndShortcutsPane1.SetBackColor(RGB(0,255,0));
    
    m_wndShortcutsPane1.AddButton (images.ExtractIcon (0), _T("View 1"), ID_SHORTCUT_1);
    m_wndShortcutsPane1.AddButton (images.ExtractIcon (1), _T("View 2"), ID_SHORTCUT_2);
    m_wndShortcutsPane1.AddButton (images.ExtractIcon (2), _T("View 3"), ID_SHORTCUT_3);
    m_wndShortcutsPane1.AddButton (images.ExtractIcon (3), _T("View 4"), ID_SHORTCUT_4);

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CBasePane

            CPane

               CMFCBaseToolBar

                  CMFCToolBar

                     CMFCOutlookBarPane

Requirements

Header: afxoutlookbarpane.h

See Also

Reference

Hierarchy Chart

CMFCToolBar Class

CMFCOutlookBar Class

CMFCOutlookBarTabCtrl Class

Other Resources

MFC Classes