Antarmuka ITfContext (msctf.h)

Antarmuka ITfContext diimplementasikan oleh manajer TSF dan digunakan oleh aplikasi dan layanan teks untuk mengakses konteks pengeditan.

Warisan

Antarmuka ITfContext mewarisi dari antarmuka IUnknown . ITfContext juga memiliki jenis anggota ini:

Metode

Antarmuka ITfContext memiliki metode ini.

 
ITfContext::CreateRangeBackup

Metode ITfContext::CreateRangeBackup
ITfContext::EnumProperties

Metode ITfContext::EnumProperties
ITfContext::GetActiveView

Metode ITfContext::GetActiveView
ITfContext::GetAppProperty

Metode ITfContext::GetAppProperty
ITfContext::GetDocumentMgr

Metode ITfContext::GetDocumentMgr
ITfContext::GetEnd

Metode ITfContext::GetEnd
ITfContext::GetProperty

Metode ITfContext::GetProperty
ITfContext::GetSelection

Metode ITfContext::GetSelection
ITfContext::GetStart

Metode ITfContext::GetStart
ITfContext::GetStatus

Metode ITfContext::GetStatus
ITfContext::InWriteSession

Metode ITfContext::InWriteSession
ITfContext::RequestEditSession

Metode ITfContext::RequestEditSession
ITfContext::SetSelection

Metode ITfContext::SetSelection
ITfContext::TrackProperties

Metode ITfContext::TrackProperties

Keterangan

Objek konteks edit dibuat dengan memanggil ITfDocumentMgr::CreateContext. Seringkali, layanan teks menggunakan konteks edit yang saat ini aktif. Konteks edit yang saat ini aktif adalah konteks edit di bagian atas tumpukan manajer dokumen aktif.

Contoh


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();
}

Persyaratan

   
Klien minimum yang didukung Windows 2000 Professional [aplikasi desktop | Aplikasi UWP]
Server minimum yang didukung Windows 2000 Server [aplikasi desktop | Aplikasi UWP]
Target Platform Windows
Header msctf.h
Redistribusi TSF 1.0 di Windows 2000 Professional

Lihat juga

Edit Konteks

ITfDocumentMgr::CreateContext

IUnknown