COleControl::ClipCaretRect

BOOL ClipCaretRect( LPRECT lpRect );

Return Value

Nonzero if successful; otherwise 0.

Parameters

lpRect

On input, a pointer to a RECT structure that contains the caret area to be adjusted. On output, the adjusted caret area, or NULL if the caret rectangle is completely covered.

Remarks

Call this function to adjust a caret rectangle if it is entirely or partially covered by overlapping, opaque objects. A caret is a flashing line, block, or bitmap that typically indicates where text or graphics will be inserted.

A windowless object cannot safely show a caret without first checking whether the caret is partially or totally hidden by overlapping objects. In order to make that possible, an object can use ClipCaretRect to get the caret adjusted (reduced) to ensure it fits in the clipping region.

Objects creating a caret should submit the caret rectangle to ClipCaretRect and use the adjusted rectangle for the caret. If the caret is entirely hidden, this method will return FALSE and the caret should not be shown at all in this case.

COleControl OverviewClass MembersHierarchy Chart