Windows apps
Collapse the table of content
Expand the table of content
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.

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

IUnknown
Compartments

 

 

Show:
© 2016 Microsoft