Editor_SetCaretPos¶
Specifies the cursor position. You can use this inline function or explicitly send the EE_SET_CARET_POS message.
Editor_SetCaretPos( HWND hwnd, int nLogical, POINT_PTR* pptPos );
Parameters¶
hwnd
Specifies the window handle of the view or frame of EmEditor.
nLogical
Specifies one of the following values.
Value | Meaning |
---|---|
POS_VIEW | Display Coordinates |
POS_LOGICAL_A | Logical Coordinates (Count double-byte characters as two) |
POS_LOGICAL_W | Logical Coordinates (Count double-byte characters as one) |
POS_SCROLL_ALWAYS | When used with POS_SCROLL_CENTER or POS_SCROLL_TOP, the cursor position moves even if the current cursor position is already visible. |
POS_SCROLL_CENTER | The cursor position becomes near the center of the window. |
POS_SCROLL_DONT_CARE | The cursor position becomes where the scrolling becomes minimum. |
POS_SCROLL_TOP | The cursor position becomes the top of the window. |
pptPos
Pointer to a POINT_PTR structure that specified the cursor position.
Return Values¶
The return value is not used.
Version¶
Supported on Version 4.03 or later. However, POS_SCROLL_DONT_CARE, POS_SCROLL_CENTER, and POS_SCROLL_TOP flags are supported on Version 6.00 or later. POS_SCROLL_ALWAYS is supported on Version 7.00.4 or later.