IOleInPlaceActiveObject::ResizeBorder

Alerts the object that it needs to resize its border space.

HRESULT ResizeBorder(
  LPCRECT prcBorder,              //Pointer to new outer rectangle 
                                  // for border space
  IOleInPlaceUIWindow pUIWindow,  //Pointer to frame or document 
                                  // window border change
  BOOL fFrameWindow               //Indicates whether frame window 
                                  // object calls ResizeBorder
);
 

Parameters

prcBorder
[in] Pointer to a RECT structure containing the new outer rectangle within which the object can request border space for its tools.
pUIWindow
[in] Pointer to the frame or document window object whose border has changed.
fFrameWindow
[in] TRUE if the frame window object is calling ResizeBorder; otherwise, FALSE.

Return Values

This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:

S_OK
The method alerted the object successfully.

Remarks

Notes to Callers

IOleInPlaceActiveObject::ResizeBorder is called by the top-level container's document or frame window object when the border space allocated to the object should change. Because the active in-place object is not informed about which window has changed (the frame- or document-level window), IOleInPlaceActiveObject::ResizeBorder must be passed the pointer to the window's IOleInPlaceUIWindow interface.

Notes to Implementers

In most cases, resizing only requires that you grow, shrink, or scale your object's frame adornments. However, for more complicated adornments, you may be required to renegotiate for border space with calls to IOleInPlaceUIWindow::RequestBorderSpace and IOleInPlaceUIWindow::SetBorderSpace.

Note  While executing IOleInPlaceActiveObject::ResizeBorder, do not make calls to the Windows PeekMessage or GetMessage functions, or a dialog box. Doing so may cause the system to deadlock. There are further restrictions on which OLE interface methods and functions can be called from within ResizeBorder.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in oleidl.h.

See Also

IOleInPlaceUIWindow::GetBorder

PeekMessage, GetMessage in Win32