ITfRange::GetFormattedText method (msctf.h)
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
[in] ec
Edit cookie obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.
[out] ppDataObject
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.
Value | Description |
---|---|
|
The method was successful. |
|
One or more parameters are invalid. |
|
The context owner does not support exporting formatted text as an IDataObject object. |
|
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
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 | msctf.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |