ITextServices::TxGetCurTargetX method (textserv.h)
Gets the target x position, that is, the current horizontal position of the caret.
Syntax
HRESULT TxGetCurTargetX(
LONG *unnamedParam1
);
Parameters
unnamedParam1
Return value
Type: HRESULT
If the x position of the caret is returned, the return value is S_OK.
If the method fails, the return value is the following HRESULT code. For more information on COM error codes, see Error Handling in COM.
Return code | Description |
---|---|
|
There is no selection. |
|
The input argument is invalid. |
Remarks
Together with ITextServices::OnTxSetCursor, this method allows you to maintain the horizontal caret position when moving the caret up and down. This capability is useful when moving the caret through forms.
The target caret position is expressed as an x-coordinate on the display because other controls do not necessarily share the same attributes for column position.
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
Reference