description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: COleIPFrameWndEx Class |
COleIPFrameWndEx Class |
11/04/2016 |
|
|
ebff1560-a1eb-4854-af00-95d4a192bd55 |
The COleIPFrameWndEx
class implements an OLE container that supports MFC. You must derive the in-place frame window class for your application from the COleIPFrameWndEx
class, instead of deriving it from the COleIPFrameWndclass.
For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.
class COleIPFrameWndEx : public COleIPFrameWnd
Name | Description |
---|---|
COleIPFrameWndEx::AddDockSite | |
COleIPFrameWndEx::AddPane | |
COleIPFrameWndEx::AdjustDockingLayout | |
COleIPFrameWndEx::DockPane | |
COleIPFrameWndEx::DockPaneLeftOf | Docks one pane to the left of another pane. |
COleIPFrameWndEx::EnableAutoHidePanes | |
COleIPFrameWndEx::EnableDocking | |
COleIPFrameWndEx::EnablePaneMenu | |
COleIPFrameWndEx::GetActivePopup | Returns a pointer to the currently displayed popup menu. |
COleIPFrameWndEx::GetContainerFrameWindow | |
COleIPFrameWndEx::GetDefaultResId | Returns the resource ID of the frame window that you specified when the window was loaded. |
COleIPFrameWndEx::GetDockFrame | |
COleIPFrameWndEx::GetDockingManager | |
COleIPFrameWndEx::GetMainFrame | |
COleIPFrameWndEx::GetMenuBar | Returns a pointer to the menu bar object attached to the frame window. |
COleIPFrameWndEx::GetPane | |
COleIPFrameWndEx::GetTearOffBars | Returns a list of pane objects that are in a tear-off state. |
COleIPFrameWndEx::GetToolbarButtonToolTipText | Called by the framework before the tooltip for a button is displayed. |
COleIPFrameWndEx::InsertPane | |
COleIPFrameWndEx::IsMenuBarAvailable | Determines whether the pointer to the menu bar object is not NULL . |
COleIPFrameWndEx::IsPointNearDockSite | |
COleIPFrameWndEx::LoadFrame | (Overrides COleIPFrameWnd::LoadFrame .) |
COleIPFrameWndEx::OnCloseDockingPane | |
COleIPFrameWndEx::OnCloseMiniFrame | |
COleIPFrameWndEx::OnClosePopupMenu | Called by the framework when an active pop-up menu processes a WM_DESTROY message. |
COleIPFrameWndEx::OnCmdMsg | (Overrides CFrameWnd::OnCmdMsg .) |
COleIPFrameWndEx::OnDrawMenuImage | Called by the framework when the image associated with a menu item is drawn. |
COleIPFrameWndEx::OnDrawMenuLogo | Called by the framework when a CMFCPopupMenuobject processes a WM_PAINT message. |
COleIPFrameWndEx::OnMenuButtonToolHitTest | Called by the framework when a CMFCToolBarButtonobject processes WM_NCHITTEST message. |
COleIPFrameWndEx::OnMoveMiniFrame | |
COleIPFrameWndEx::OnSetPreviewMode | Call this member function to set the application's main frame window into and out of print-preview mode. (Overrides CFrameWnd::OnSetPreviewMode.) |
COleIPFrameWndEx::OnShowCustomizePane | |
COleIPFrameWndEx::OnShowPanes | |
COleIPFrameWndEx::OnShowPopupMenu | Called by the framework when a pop-up menu is activated. |
COleIPFrameWndEx::OnTearOffMenu | Called by the framework when a menu that has a tear-off bar is activated. |
COleIPFrameWndEx::PaneFromPoint | |
COleIPFrameWndEx::PreTranslateMessage | (Overrides COleIPFrameWnd::PreTranslateMessage .) |
COleIPFrameWndEx::RecalcLayout | (Overrides COleIPFrameWnd::RecalcLayout .) |
COleIPFrameWndEx::RemovePaneFromDockManager | |
COleIPFrameWndEx::SetDockState | Applies the specified docking state to the panes that belong to the frame window. |
COleIPFrameWndEx::SetupToolbarMenu | Modifies a toolbar object by searching for dummy items and replacing them with the specified user-defined items. |
COleIPFrameWndEx::ShowPane | |
COleIPFrameWndEx::WinHelpA | Called by the framework to initiate the WinHelp application or context help. |
Name | Description |
---|---|
COleIPFrameWndEx::InitUserToobars | Tells the framework to initialize a range of control IDs that are assigned to user-defined toolbars. |
The following example demonstrates how to subclass an instance of the COleIPFrameWndEx
class and over ride its methods. The example shows how to over ride the OnDestory
method, the RepositionFrame
method, the RecalcLayout
method, and the CalcWindowRect
method. This code snippet is part of the Word Pad sample.
[!code-cppNVC_MFC_WordPad#1]
Header: afxoleipframewndex.h
void AddDockSite();
BOOL AddPane(
CBasePane* pControlBar,
BOOL bTail = TRUE);
[in] pControlBar
[in] bTail
virtual void AdjustDockingLayout(HDWP hdwp = NULL);
[in] hdwp
void DockPane(
CBasePane* pBar,
UINT nDockBarID = 0,
LPCRECT lpRect = NULL);
[in] pBar
[in] nDockBarID
[in] lpRect
Docks one pane to the left of another pane.
BOOL DockPaneLeftOf(
CPane* pBar,
CPane* pLeftOf);
pBar
[in] A pointer to the pane to dock.
pLeftOf
[in] A pointer to the pane that serves as origin.
Returns TRUE if the operation is successful. Otherwise returns FALSE.
Call this method to dock several pane objects in a predefined order. This method docks the pane specified by pBar to the left of the pane specified by pLeftOf.
BOOL EnableAutoHidePanes(DWORD dwDockStyle);
[in] dwDockStyle
BOOL EnableDocking(DWORD dwDockStyle);
[in] dwDockStyle
void EnablePaneMenu(
BOOL bEnable,
UINT uiCustomizeCmd,
const CString& strCustomizeLabel,
UINT uiViewToolbarsMenuEntryID,
BOOL bContextMenuShowsToolbarsOnly = FALSE,
BOOL bViewMenuShowsToolbarsOnly = FALSE);
[in] bEnable
[in] uiCustomizeCmd
[in] strCustomizeLabel
[in] uiViewToolbarsMenuEntryID
[in] bContextMenuShowsToolbarsOnly
[in] bViewMenuShowsToolbarsOnly
Returns a pointer to the currently displayed pop-up menu.
CMFCPopupMenu* GetActivePopup() const;
A pointer to the active pop-up menu; otherwise NULL.
Use this method to obtain a pointer to the CMFCPopupMenu Class object that is currently displayed.
COleCntrFrameWndEx* GetContainerFrameWindow();
Returns the menu resource ID that was specified when the frame window loaded the menu.
UINT GetDefaultResId() const;
Returns the resource ID of the menu, or 0 if the frame window has no menu bar.
Call this function to retrieve the resource ID that was specified when the frame window loaded the menu resource by calling COleIPFrameWndEx::LoadFrame
.
CFrameWnd* GetDockFrame();
CDockingManager* GetDockingManager();
CFrameWnd* GetMainFrame();
Returns a pointer to the menu bar object attached to the frame window.
const CMFCMenuBar* GetMenuBar() const;
A pointer to the menu bar object.
Use this function to retrieve a pointer to the menu bar object that belongs to the COleIPFrameWndEx
object.
CBasePane* GetPane(UINT nID);
[in] nID
Returns a list of pane objects that are in a tear-off state.
const CObList& GetTearOffBars() const;
A reference to a CObList
object that contains a collection of pointers to the CBasePane Class-derived objects.
The COleIPFrameWndEx
object maintains the collection of tear-off menus as a list of CBasePane Class-derived objects. Use this method to retrieve a reference to this list.
Called by the framework before the tooltip for a button is displayed.
virtual BOOL GetToolbarButtonToolTipText(
CMFCToolBarButton* pButton,
CString& strTTText);
pButton
[in] Pointer to the button.
strTTText
[in] Pointer to the tooltip text.
The default implementation returns 0.
Override this function to customize the display of tooltips on toolbar buttons.
Specifies a range of control IDs that the framework assigns to the user-defined toolbars.
void InitUserToolbars(
LPCTSTR lpszRegEntry,
UINT uiUserToolbarFirst,
UINT uiUserToolbarLast)
lpszRegEntry
[in] The registry entry where the library stores user toolbar settings.
uiUserToolbarFirst
[in] Control ID assigned to the first user-defined toolbar.
uiUserToolbarLast
[in] Control ID assigned to the last user-defined toolbar.
Use this function to initialize a range of control IDs for assignment to toolbars that users define dynamically. The parameters uiUserToolbarFirst and uiUserToolbarLast define a range of allowed toolbar control IDs. To disable the creation of user-defined toolbars, set uiUserToolbarFirst or uiUserToolbarLast to -1.
BOOL InsertPane(
CBasePane* pControlBar,
CBasePane* pTarget,
BOOL bAfter = TRUE);
[in] pControlBar
[in] pTarget
[in] bAfter
Determines whether the pointer to the menu bar object is not NULL
BOOL IsMenuBarAvailable() const;
Returns a non-zero value if the frame window has a menu bar; otherwise returns 0.
Call this method to determine whether the frame window maintains a non- NULL pointer to its menu bar object.
BOOL IsPointNearDockSite(
CPoint point,
DWORD& dwBarAlignment,
BOOL& bOuterEdge) const;
[in] point
[in] dwBarAlignment
[in] bOuterEdge
virtual BOOL LoadFrame(
UINT nIDResource,
DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE,
CWnd* pParentWnd = NULL,
CCreateContext* pContext = NULL);
[in] nIDResource
[in] dwDefaultStyle
[in] pParentWnd
[in] pContext
virtual BOOL OnCloseDockingPane(CDockablePane*);
[in] CDockablePane*
virtual BOOL OnCloseMiniFrame(CPaneFrameWnd*);
[in] CPaneFrameWnd*
Called by the framework when an active pop-up menu processes a WM_DESTROY message.
virtual void OnClosePopupMenu(CMFCPopupMenu* pMenuPopup);
pMenuPopup
[in] A pointer to the pop-up menu object.
Override this method to receive notifications from CMFCPopupMenu
objects when they process WM_DESTROY messages.
virtual BOOL OnCmdMsg(
UINT nID,
int nCode,
void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo);
[in] nID
[in] nCode
[in] pExtra
[in] pHandlerInfo
Called by the framework when the image that is associated with a menu item is drawn.
virtual BOOL OnDrawMenuImage(
CDC* pDC,
const CMFCToolBarMenuButton* pMenuButton,
const CRect& rectImage);
pDC
[in] Pointer to the device context.
pMenuButton
[in] Pointer to the menu button.
rectImage
[in] The image associated with the menu item.
The default implementation does nothing and returns 0.
Override this method if you want to customize image drawing for the menu items that belong to the menu bar owned by the COleIPFrameWndEx
-derived object.
Called by the framework when a CMFCPopupMenuobject processes a WM_PAINT message.
virtual void OnDrawMenuLogo(
CDC* pDC,
CMFCPopupMenu* pMenu,
const CRect& rectLogo);
pDC
[in] Pointer to the device context.
pMenu
[in] Pointer to the pop-up menu object.
rectLogo
[in] Pointer to the logo to display.
Override this method to display a logo on the pop-up menu associated with the menu bar owned by the COleIPFrameWndEx
-derived object. The default implementation does nothing.
Called by the framework when a CMFCToolBarButtonobject processes a WM_NCHITTEST message.
virtual BOOL OnMenuButtonToolHitTest(
CMFCToolBarButton* pButton,
TOOLINFO* pTI);
[in] pButton Pointer to a menu button.
[out] pTI
Pointer to a TOOLINFO
structure.
The default implementation does nothing and returns 0. Your implementation should return a non-zero value if it fills the pTI parameter.
Override this method to provide ToolTip information about a specific menu item.
virtual BOOL OnMoveMiniFrame(CWnd* pFrame);
[in] pFrame
virtual void OnSetPreviewMode(
BOOL bPreview,
CPrintPreviewState* pState);
[in] bPreview
[in] pState
virtual BOOL OnShowCustomizePane(
CMFCPopupMenu* pMenuPane,
UINT uiToolbarID);
[in] pMenuPane
[in] uiToolbarID
virtual BOOL OnShowPanes(BOOL bShow);
[in] bShow
Called by the framework when a pop-up menu is displayed.
virtual BOOL OnShowPopupMenu(CMFCPopupMenu* pMenuPopup);
pMenuPopup
[in] Pointer to the pop-up menu to be displayed.
The default implementation does nothing and returns a non-zero value. Your implementation should return FALSE if the pop-up menu cannot be displayed.
Override this method to customize the display of a pop-up menu. For example, you could change the menu buttons to color menu buttons or initialize tear-off bars.
Called by the framework when the user selects a menu that has a tear-off bar.
virtual BOOL OnTearOffMenu(
CMFCPopupMenu* pMenuPopup,
CPane* pBar);
pMenuPopup
[in] A pointer to the pop-up menu that the user selected.
pBar
[in] A pointer to the pane that hosts the menu.
TRUE if you want the framework to activate the pop-up menu; otherwise FALSE. The default value is TRUE.
Override this function if you want to customize the setup of the tear-off bar.
CBasePane* PaneFromPoint(
CPoint point,
int nSensitivity,
bool bExactBar,
CRuntimeClass* pRTCBarType) const;
CBasePane* PaneFromPoint(
CPoint point,
int nSensitivity,
DWORD& dwAlignment,
CRuntimeClass* pRTCBarType) const;
[in] point
[in] nSensitivity
[in] bExactBar
[in] pRTCBarType
[in] dwAlignment
virtual BOOL PreTranslateMessage(MSG* pMsg);
[in] pMsg
virtual void RecalcLayout(BOOL bNotify = TRUE);
[in] bNotify
void RemovePaneFromDockManager(
CBasePane* pControlBar,
BOOL bDestroy,
BOOL bAdjustLayout,
BOOL bAutoHide,
CBasePane* pBarReplacement);
[in] pControlBar
[in] bDestroy
[in] bAdjustLayout
[in] bAutoHide
[in] pBarReplacement
Applies the specified docking state to panes that belong to the frame window.
void SetDockState(const CDockState& state);
state
[in] Specifies the docking state.
Use this function to specify a new docking state for panes that belong to the COleIPFrameWndEx
object.
Modifies a toolbar object by searching for dummy items and replacing them with the specified user-defined items.
void SetupToolbarMenu(
CMenu& menu,
const UINT uiViewUserToolbarCmdFirst,
const UINT uiViewUserToolbarCmdLast);
menu
[in] A reference to a CMenu object to be modified.
uiViewUserToolbarCmdFirst
[in] Specifies the first user-defined command.
uiViewUserToolbarCmdLast
[in] Specifies the last user-defined command.
void ShowPane(
CBasePane* pBar,
BOOL bShow,
BOOL bDelay,
BOOL bActivate);
[in] pBar
[in] bShow
[in] bDelay
[in] bActivate
Called by the framework to initiate the WinHelp application or context help.
virtual void WinHelp(
DWORD dwData,
UINT nCmd = HELP_CONTEXT);
[in] dwData Specifies data as required for the type of help specified by nCmd.
nCmd
[in] Specifies the type of help requested. For a list of possible values and how they affect the dwData parameter, see the WinHelp Function in the Windows SDK.
Hierarchy Chart
Classes
CFrameWndEx Class
CMDIFrameWndEx Class