ITfContext interface (msctf.h)

The ITfContext interface is implemented by the TSF manager and used by applications and text services to access an edit context.

Inheritance

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

Methods

The ITfContext interface has these methods.

 
ITfContext::CreateRangeBackup

ITfContext::CreateRangeBackup method
ITfContext::EnumProperties

ITfContext::EnumProperties method
ITfContext::GetActiveView

ITfContext::GetActiveView method
ITfContext::GetAppProperty

ITfContext::GetAppProperty method
ITfContext::GetDocumentMgr

ITfContext::GetDocumentMgr method
ITfContext::GetEnd

ITfContext::GetEnd method
ITfContext::GetProperty

ITfContext::GetProperty method
ITfContext::GetSelection

ITfContext::GetSelection method
ITfContext::GetStart

ITfContext::GetStart method
ITfContext::GetStatus

ITfContext::GetStatus method
ITfContext::InWriteSession

ITfContext::InWriteSession method
ITfContext::RequestEditSession

ITfContext::RequestEditSession method
ITfContext::SetSelection

ITfContext::SetSelection method
ITfContext::TrackProperties

ITfContext::TrackProperties method

Remarks

An edit context object is created by calling ITfDocumentMgr::CreateContext. Often, a text service uses the currently active edit context. The currently active edit context is the edit context at the top of the stack of the active document manager.

Examples


HRESULT         hr;
ITfDocumentMgr  *pFocusDoc;

hr = pThreadMgr->GetFocus(&pFocusDoc);
if(SUCCEEDED(hr))
{
    ITfContext *pContext;

    hr = pFocusDoc->GetTop(&pContext);
    if(SUCCEEDED(hr))
    {
        //Use the context. 
        
        pContext->Release();
    }

    pFocusDoc->Release();
}

Requirements

   
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
Redistributable TSF 1.0 on Windows 2000 Professional

See also

Edit Contexts

ITfDocumentMgr::CreateContext

IUnknown