ITfContextOwner::GetTextExt method (msctf.h)
The ITfContextOwner::GetTextExt method returns the bounding box, in screen coordinates, of the text at a specified character position. The caller must have a read-only lock on the document before calling this method.
Syntax
HRESULT GetTextExt(
[in] LONG acpStart,
[in] LONG acpEnd,
[out] RECT *prc,
[out] BOOL *pfClipped
);
Parameters
[in] acpStart
Specifies the starting character position of the text to get in the document.
[in] acpEnd
Specifies the ending character position of the text to get in the document.
[out] prc
Receives the bounding box, in screen coordinates, of the text at the specified character positions.
[out] pfClipped
Receives the Boolean value that specifies if the text in the bounding box has been clipped. If this parameter is TRUE, the bounding box contains clipped text and does not include the entire requested range of text. The bounding box is clipped because of the requested range is not visible.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The specified start and end character positions are equal. |
|
The range specified by the acpStart and acpEnd parameters extends past the end of the document or the top of the document. |
|
The application has not calculated a text layout. |
|
The caller does not have a read-only lock on the document. |
Remarks
If the document window is minimized, or if the specified text is not currently visible, the method returns S_OK with the prc parameter set to {0,0,0,0}.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | msctf.h |
DLL | Msimtf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |