ITextStoreAnchor::GetTextExt method (textstor.h)
The ITextStoreAnchor::GetTextExt method returns the bounding box, in screen coordinates, of a range of text. The caller must have a read-only lock on the document before calling this method.
Syntax
HRESULT GetTextExt(
[in] TsViewCookie vcView,
[in] IAnchor *paStart,
[in] IAnchor *paEnd,
[out] RECT *prc,
[out] BOOL *pfClipped
);
Parameters
[in] vcView
Specifies the context view.
[in] paStart
Specifies the anchor positioned at the start of the range.
[in] paEnd
Specifies the anchor positioned at the end of the range.
[out] prc
Receives the bounding box of the text range in screen coordinates.
[out] pfClipped
Receives a Boolean value that specifies if the text in the bounding box has been clipped. If TRUE, the bounding box contains clipped text and does not include the entire requested text range. The bounding box is clipped because the requested range is not visible.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The method was unable to obtain a valid interface pointer to the start and/or end anchors. |
|
One or more of the input parameters is invalid. |
|
The range specified by the paStart and paEnd parameters extends past the beginning or end of the document. |
|
The application has not calculated a text layout. Any further calls will not succeed until the application calls ITextStoreAnchorSink::OnLayoutChange. |
|
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 | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | textstor.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |