CreateCaret function
Creates the Caret (text cursor) for the specified windowed control.
Declaration
function CreateCaret(Handle: HWND; Bitmap: hBitmap; width: Integer;
Height: Integer): BooleanArguments
Handle | The handle for the windowed control that owns the caret. |
Bitmap | The handle for the Bitmap with the caret shape, 0 for a solid (black) caret, or 1 for a gray caret. |
width | The width of the caret. |
Height | The height of the caret. |
Function result
False on failure.Description
CreateCaret is a
Boolean function used to created the
caret (or text cursor) displayed on a control when editing is active.
CreateCaret calls the corresponding routine in the widgetset class to
initialize the cursor with a given size, or a shape loaded from a bitmap
image.
Handle is the HWND value representing the handle for the windowed
control which owns and implements the caret.
Bitmap is the HBITMAP value with the handle for the bitmap image
used as the caret shape. When Bitmap is set to 0, a handle is not available
for the caret shape. When Bitmap is assigned, the values in the Height and
Width arguments are ignored; the dimensions are determined by the bitmap
image.
The Windows platform attaches special meanings to the values 0 and 1 in the Bitmap handle. 0 causes a solid black block with the dimensions in Height and Width to be used as the caret shape. 1 causes a solid gray block with the dimensions in Height and Width to be used as the caret shape.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
