ScriptStringXtoCP
The ScriptStringXtoCP function converts an x-coordinate to a character position.
HRESULT WINAPI ScriptStringXtoCP(
SCRIPT_STRING_ANALYSIS ssa,
int iX,
int *piCh,
int *piTrailing
);
Parameters
ssa
[in] A SCRIPT_STRING_ANALYSIS structure for the string.
iX
[in] Specifies the x coordinate.
piCh
[out] Pointer to a variable that receives the character position corresponding to iX.
piTrailing
[out] Pointer to a variable that receives an indicator whether the position is the leading or trailing edge of the character.
Return Values
If the function is successful, it returns S_OK.
If the function fails, it returns an HRESULT.
The return value can be tested with the SUCCEEDED and FAILED macros.
Requirements
Windows NT/2000/XP: Included in Windows 2000 and later.
Redistributable: Requires Internet Explorer 5 or later on Windows 95/98/Me.
Header: Declared in Usp10.h.
Library: Use Usp10.lib.