UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:usp10.ScriptStringXtoCP |
ScriptStringXtoCP function (usp10.h) |
Converts an x coordinate to a character position. |
|
intl\scriptstringxtocp.htm |
Intl |
ae37f58a-cc9c-4414-a8ac-e70691e54c5e |
12/05/2018 |
ScriptStringXtoCP, ScriptStringXtoCP function [Internationalization for Windows Applications], _win32_ScriptStringXtoCP, intl.scriptstringxtocp, usp10/ScriptStringXtoCP |
usp10.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Usp10.lib |
Usp10.dll |
Windows |
Internet Explorer 5 or later on Windows Me/98/95 |
19H1 |
|
|
|
|
|
|
Converts an x coordinate to a character position.
A SCRIPT_STRING_ANALYSIS structure for the string.
The x coordinate.
Pointer to a variable in which this function retrieves the character position corresponding to the x coordinate.
Pointer to a variable in which this function retrieves a value indicating if the x coordinate is for the leading edge or the trailing edge of the character position. For more information, see the Remarks section.
Returns S_OK if successful. The function returns a nonzero HRESULT value if it does not succeed. The application can test the return value with the SUCCEEDED and FAILED macros.
If the x coordinate corresponds to the leading edge of the character, the value of piTrailing is 0. If the x coordinate corresponds to the trailing edge of the character, the value of piTrailing is a positive integer. As for ScriptXtoCP, the value is 1 for a character that can be rendered on its own. The value is greater than 1 if the character is part of a cluster in a script for which cursors are not placed within a cluster, to indicate the offset to the next legitimate logical cursor position.
If the x coordinate is before the beginning of the line, the function retrieves -1 for piCh and 1 for piTrailing, indicating the trailing edge of the nonexistent character before the line. If the x coordinate is after the end of the line, the function retrieves for piCh the first index beyond the length of the line and 0 for piTrailing. The 0 value indicates the leading edge of the nonexistent character after the line.