ITextHost::TxCreateCaret method (textserv.h)

Creates a new shape for windowless rich edit control's caret.

Syntax

BOOL TxCreateCaret(
  [in] HBITMAP hbmp,
  [in] INT     xWidth,
  [in] INT     yHeight
);

Parameters

[in] hbmp

Type: HBITMAP

Handle to the bitmap for the new caret shape.

If the windowless rich edit control has the SES_LOGICALCARET style, hbmp is a combination of the following values:

Value Meaning
CARET_CUSTOM
An adorned caret. This value is valid only if CARET_RTL is also specified.
CARET_ITALIC
An italicized caret.
CARET_NONE
A blinking vertical bar.
CARET_NULL
An empty bitmap (for non-degenerate text selection).
CARET_ROTATE90
A caret that is rotated clockwise by 90 degrees.
CARET_RTL
The caret moves right to left.

[in] xWidth

Type: INT

Caret width, in logical units.

[in] yHeight

Type: INT

Caret height, in logical units.

Return value

Type: BOOL

Return TRUE if the method succeeds.

Return FALSE if the method fails.

Remarks

This method is only valid when the control is in-place active; calls while the control is inactive may fail.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header textserv.h
DLL Msftedit.dll

See also

Conceptual

CreateCaret

ITextHost

Other Resources

Windowless Rich Edit Controls