Share via


COleIPFrameWnd Class

 

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

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

Syntax

class COleIPFrameWnd : public CFrameWnd  

Members

Public Constructors

Name Description
COleIPFrameWnd::COleIPFrameWnd Constructs a COleIPFrameWnd object.

Public Methods

Name Description
COleIPFrameWnd::OnCreateControlBars Called by the framework when an item is activated for in-place editing.
COleIPFrameWnd::RepositionFrame Called by the framework to reposition the in-place editing window.

Remarks

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.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CFrameWnd

COleIPFrameWnd

Requirements

Header: afxole.h

COleIPFrameWnd::COleIPFrameWnd

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.

COleIPFrameWnd::OnCreateControlBars

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.

COleIPFrameWnd::RepositionFrame

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."

See Also

MFC Sample HIERSVR
CFrameWnd Class
Hierarchy Chart
CFrameWnd Class