description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CMFCRibbonMiniToolBar Class |
CMFCRibbonMiniToolBar Class |
11/04/2016 |
|
|
7017e963-aeaf-4fe9-b540-e15a7ed41e94 |
Implements a contextual popup toolbar.
class CMFCRibbonMiniToolBar : public CMFCRibbonPanelMenu
Name | Description |
---|---|
CMFCRibbonMiniToolBar::CMFCRibbonMiniToolBar |
Default constructor. |
CMFCRibbonMiniToolBar::~CMFCRibbonMiniToolBar |
Destructor. |
Name | Description |
---|---|
CMFCRibbonMiniToolBar::CreateObject |
Used by the framework to create a dynamic instance of this class type. |
CMFCRibbonMiniToolBar::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
CMFCRibbonMiniToolBar::IsContextMenuMode | |
CMFCRibbonMiniToolBar::IsRibbonMiniToolBar | (Overrides CMFCPopupMenu::IsRibbonMiniToolBar .) |
CMFCRibbonMiniToolBar::SetCommands | Sets the list of commands to be displayed on the toolbar. |
CMFCRibbonMiniToolBar::Show | Displays the mini toolbar at the specified screen coordinates. |
CMFCRibbonMiniToolBar::ShowWithContextMenu | Displays the mini toolbar together with a context menu. |
The mini toolbar is typically displayed after the user selects an object in a document. For example, after the user selects a block of text in a word processing program, the application displays a mini toolbar that contains text formatting commands.
The mini toolbar becomes transparent when the mouse pointer is out of the bounds of the mini toolbar.
CMFCRibbonPanelMenu
Header: afxRibbonMiniToolBar.h
Sets the list of commands to be displayed on the toolbar.
void SetCommands(
CMFCRibbonBar* pRibbonBar,
const CList<UINT,UINT>& lstCommands);
pRibbonBar
[in] The ribbon bar that the mini toolbar searches for the buttons to display.
lstCommands
[in] The list of commands to be displayed on the mini toolbar. All ribbon categories are searched to find the associated buttons.
Use this function to set the list of commands to be displayed in the mini toolbar.
The following example demonstrates how to use the SetCommands
method of the CMFCRibbonMiniToolBar
class. This code snippet is part of the MS Office 2007 Demo sample.
[!code-cppNVC_MFC_MSOffice2007Demo#9]
Displays the mini toolbar at the specified screen coordinates.
BOOL Show(
int x,
int y);
x
[in] Specifies the horizontal position of the mini toolbar in screen coordinates.
y
[in] Specifies the vertical position of the mini toolbar in screen coordinates.
TRUE if the mini toolbar was displayed successfully; otherwise, FALSE.
Displays the mini toolbar together with a context menu.
BOOL ShowWithContextMenu(
int x,
int y,
UINT uiMenuResID,
CWnd* pWndOwner);
x
[in] Specifies the horizontal position of the context menu in screen coordinates.
y
[in] Specifies the vertical position of the context menu in screen coordinates.
uiMenuResID
[in] Specifies the resource ID of the context menu to display.
pWndOwner
[in] Identifies the window which receives messages from the context menu.
TRUE if the context menu was displayed successfully; otherwise, FALSE.
Use this function to display a mini toolbar that has a context menu. The context menu is positioned 15 pixels below the mini toolbar.
For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.
BOOL IsContextMenuMode() const;
For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.
virtual BOOL IsRibbonMiniToolBar() const;