Windows Dev Center

ITfRange::GetText method

The ITfRange::GetText method obtains the content covered by this range of text.

Syntax


HRESULT GetText(
  [in]  TfEditCookie ec,
  [in]  DWORD        dwFlags,
  [out] WCHAR        *pchText,
  [in]  ULONG        cchMax,
  [out] ULONG        *pcch
);

Parameters

ec [in]

Edit cookie that identifies the edit context obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.

dwFlags [in]

Bit fields that specify optional behavior.

ValueMeaning
TF_TF_MOVESTART

Start anchor of the range is advanced to the position after the last character returned.

TF_TF_IGNOREEND

Method attempts to fill pchText with the maximum number of characters, instead of halting the copy at the position occupied by the end anchor of the range.

 

pchText [out]

Pointer to a buffer to receive the text in the range.

cchMax [in]

Maximum size of the text buffer.

pcch [out]

Pointer to a ULONG representing the number of characters written to the pchText text buffer.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_FAIL

An unspecified error occurred.

E_INVALIDARG

One or more parameters are invalid.

TF_E_NOLOCK

The value of the ec parameter is an invalid cookie, or the caller does not have a read-only lock.

 

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

ITfRange
Text Stores
ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession
TF_TF_* Constants

 

 

Community Additions

ADD
Show:
© 2015 Microsoft