IOleInPlaceSiteWindowless::AdjustRect  27PUQYN

Adjusts a specified rectangle if it is entirely or partially covered by overlapping, opaque objects.

HRESULT AdjustRect(

    LPRECT prc

//Rectangle to adjust

   );

 

 

Parameters

prc

[in,out] Rectangle to adjust.

 

Return Values

S_OK

The rectangle was adjusted successfully. Note S_OK means that the rectangle was not completely covered.

S_FALSE

The rectangle was adjusted successfully. Note S_FALSE means that the rectangle was completely covered. Its width and height are now NULL.

 

Remarks

The main use of this method is to adjust the size of the caret. An object willing to create a caret should submit the caret rectangle to its site object by calling this method and using the adjusted rectangle returned from it for the caret. If the caret is entirely hidden, this method will return S_FALSE and the caret should not be shown at all in this case.

In a situation where objects are overlapping this method should return the largest rectangle that is fully visible.

This method can also be used to figure whether a point or a rectangular area is visible or hidden by overlapping objects.