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.

ITfThreadMgr interface

The ITfThreadMgr defines the primary object implemented by the TSF manager. ITfThreadMgr is used by applications and text services to activate and deactivate text services, create document managers, and maintain the document context focus.

Members

The ITfThreadMgr interface inherits from the IUnknown interface. ITfThreadMgr also has these types of members:

Methods

The ITfThreadMgr interface has these methods.

MethodDescription
Activate

Activates TSF for the calling thread.

AssociateFocus

Associates the focus for a window with a document manager object.

CreateDocumentMgr

Creates a document manager object.

Deactivate

Deactivates TSF for the calling thread.

EnumDocumentMgrs

Returns an enumerator for all the document managers within the calling thread.

EnumFunctionProviders

Obtains an enumerator for all of the function providers registered for the calling thread.

GetFocus

Returns the document manager that has the input focus.

GetFunctionProvider

Obtains the specified function provider object.

GetGlobalCompartment

Obtains the global compartment manager object.

IsThreadFocus

Determines if the calling thread has the TSF input focus.

SetFocus

Sets the input focus to the specified document manager.

 

Remarks

An application obtains a pointer to this interface by calling CoCreateInstance with CLSID_TF_ThreadMgr as demonstrated below.

A text service receives a pointer to this interface in its ITfTextInputProcessor::Activate method.

Examples



HRESULT hr;
ITfThreadMgr* pThreadMgr;

hr = CoCreateInstance(  CLSID_TF_ThreadMgr, 
                        NULL, 
                        CLSCTX_INPROC_SERVER, 
                        IID_ITfThreadMgr, 
                        (void**)&pThreadMgr);


Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

See also

CoCreateInstance
ITfTextInputProcessor::Activate

 

 

Community Additions

Show:
© 2014 Microsoft