Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITfContextView::GetTextExt method

The ITfContextView::GetTextExt method returns the bounding box, in screen coordinates, of a range of text.

Syntax


HRESULT GetTextExt(
  [in]   TfEditCookie ec,
  [in]   ITfRange *pRange,
  [out]  RECT *prc,
  [out]  BOOL *pfClipped
);

Parameters

ec [in]

Specifies an edit cookie with read-only access.

pRange [in]

Specifies the range to query

prc [out]

Receives the bounding box, in screen coordinates, of the range.

pfClipped [out]

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. The bounding box is clipped because of the requested range is not visible.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

TS_E_NOLAYOUT

The text is not rendered or the context has not calculated the text layout.

TF_E_NOLOCK

The edit cookie parameter is invalid.

 

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

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfContextView
ITfContextOwner::GetTextExt

 

 

Community Additions

Show:
© 2014 Microsoft