IDeskBand2::ResizeBorderDW Method
Notifies the docking window object that the frame's border space has changed. In response to this method, the IDockingWindow implementation must call IDockingWindowSite::SetBorderSpaceDW, even if no border space is required or a change is not necessary.
Syntax
HRESULT ResizeBorderDW( LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved );
Parameters
- prcBorder
Pointer to a RECT structure that contains the frame's available border space.- punkToolbarSite
Pointer to the site's IUnknown interface. The docking window object should call the QueryInterface method for this interface, requesting IID_IDockingWindowSite. The docking window object then uses that interface to negotiate its border space. It is the docking window object's responsibility to release this interface when it is no longer needed.- fReserved
Reserved. This parameter should always be zero.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
The prcBorder parameter contains the frame's entire available border space. The docking window object should negotiate its border space and then use this information to position itself.
For example, if the docking window object requires 25 pixels at the top of the border space, it should negotiate for this through the following steps:
- Allocate a BORDERWIDTHS structure and set its top member to 25.
- Call IDockingWindowSite::RequestBorderSpaceDW to request the space.
- If the request is approved by IDockingWindowSite::RequestBorderSpaceDW, call IDockingWindowSite::SetBorderSpaceDW to allocate the space.
The docking window object can then position its window at prcBorder->left and prcBorder->top. The width of the docking window object's window is determined by subtracting prcBorder->left from prcBorder->right. Its height is contained in the top member of the BORDERWIDTHS structure.
See Also
IDockingWindow, IDockingWindowFrame, IDockingWindowSite, IDeskBand