COleIPFrameWnd Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at COleIPFrameWnd Class.

The base for your application's in-place editing window.

class COleIPFrameWnd : public CFrameWnd  

Public Constructors

NameDescription
COleIPFrameWnd::COleIPFrameWndConstructs a COleIPFrameWnd object.

Public Methods

NameDescription
COleIPFrameWnd::OnCreateControlBarsCalled by the framework when an item is activated for in-place editing.
COleIPFrameWnd::RepositionFrameCalled by the framework to reposition the in-place editing window.

This class creates and positions control bars within the container application's document window. It also handles notifications generated by an embedded COleResizeBar object when the user resizes the in-place editing window.

For more information on using COleIPFrameWnd, see the article Activation.

CObject

CCmdTarget

CWnd

CFrameWnd

COleIPFrameWnd

Header: afxole.h

Constructs a COleIPFrameWnd object and initializes its in-place state information, which is stored in a structure of type OLEINPLACEFRAMEINFO.

COleIPFrameWnd();

Remarks

For more information, see OLEINPLACEFRAMEINFO in the Windows SDK.

The framework calls the OnCreateControlBars function when an item is activated for in-place editing.

virtual BOOL OnCreateControlBars(
    CWnd* pWndFrame,  
    CWnd* pWndDoc);

 
virtual BOOL OnCreateControlBars(
    CFrameWnd* pWndFrame,  
    CFrameWnd* pWndDoc);

Parameters

pWndFrame
Pointer to the container application's frame window.

pWndDoc
Pointer to the container's document-level window. Can be NULL if the container is an SDI application.

Return Value

Nonzero on success; otherwise, 0.

Remarks

The default implementation does nothing. Override this function to perform any special processing required when control bars are created.

The framework calls the RepositionFrame member function to lay out control bars and reposition the in-place editing window so all of it is visible.

virtual void RepositionFrame(
    LPCRECT lpPosRect,  
    LPCRECT lpClipRect);

Parameters

lpPosRect
Pointer to a RECT structure or a CRect object containing the in-place frame window's current position coordinates, in pixels, relative to the client area.

lpClipRect
Pointer to a RECT structure or a CRect object containing the in-place frame window's current clipping-rectangle coordinates, in pixels, relative to the client area.

Remarks

Layout of control bars in the container window differs from that performed by a non-OLE frame window. The non-OLE frame window calculates the positions of control bars and other objects from a given frame-window size, as in a call to CFrameWnd::RecalcLayout. The client area is what remains after space for control bars and other objects is subtracted. A COleIPFrameWnd window, on the other hand, positions toolbars in accordance with a given client area. In other words, CFrameWnd::RecalcLayout works "from the outside in," whereas COleIPFrameWnd::RepositionFrame works "from the inside out."

MFC Sample HIERSVR
CFrameWnd Class
Hierarchy Chart
CFrameWnd Class

Show: