ITfRange::GetFormattedText method

The ITfRange::GetFormattedText method obtains formatted content contained within a range of text. The content is packaged in an object that supports the IDataObject interface.

Syntax


HRESULT GetFormattedText(
  [in]  TfEditCookie ec,
  [out] IDataObject  **ppDataObject
);

Parameters

ec [in]

Edit cookie obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.

ppDataObject [out]

Pointer to an IDataObject pointer that receives an object that contains the formatted content. The formatted content is obtained using a STGMEDIUM global memory handle.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_INVALIDARG

One or more parameters are invalid.

E_NOTIMPL

The context owner does not support exporting formatted text as an IDataObject object.

TF_E_NOLOCK

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

 

Remarks

The format and storage type of the IDataObject are determined by the application to which the range belongs.

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
IDataObject
Text Stores
ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession

 

 

Show: