EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

ITfCompartment interface

The ITfCompartment interface is implemented by the TSF manager and is used by clients (applications and text services) to obtain and set data in a TSF compartment.

A client also uses this interface to obtain an ITfSource interface that is used to install an ITfCompartmentEventSink compartment change notification sink. The client calls ITfCompartment::QueryInterface with IID_ITfSource to obtain the ITfSource interface.

Members

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

Methods

The ITfCompartment interface has these methods.

MethodDescription
GetValue

Obtains the data for a compartment.

SetValue

Sets the data for a compartment.

 

Examples

ITfCompartment



HRESULT hr;
VARIANT var;

VariantInit(&var);
hr = m_pCompartment->GetValue(&var);
if(S_OK == hr)
{
    switch(var.vt)
    {
    case VT_I4:
        long lValue = var.lVal;
        break;
    }

    VariantClear(&var);
}


ITfSourceITfCompartmentITfCompartmentEventSink



HRESULT     hr;
ITfSource   *pSource;

hr = m_pCompartment->QueryInterface(IID_ITfSource, 
        (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->AdviseSink(IID_ITfCompartmentEventSink, 
            (ITfCompartmentEventSink*)this,
            &m_dwCookie);

    pSource->Release();
}
                


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

Compartments

 

 

커뮤니티 추가 항목

추가
표시:
© 2014 Microsoft