Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
TSF Reference
TSF Interfaces

  Switch on low bandwidth view
ITfCompartmentEventSink Interface

The ITfCompartmentEventSink interface is implemented by a client (application or text service) and used by the TSF manager to notify the client when compartment data changes. This notification sink is installed by obtaining an ITfSource interface from the ITfCompartment object and calling ITfSource::AdviseSink with IID_ITfCompartmentEventSink and a pointer to the ITfCompartmentEventSink object.

Methods

The ITfCompartmentEventSink interface inherits the methods of the IUnknown interface.

In addition, ITfCompartmentEventSink defines the following method.

MethodDescription

OnChange

Called when compartment data changes.

Examples

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

ClientRequires Windows XP, Windows 2000 Professional, or Windows NT Workstation.
RedistributableRequires TSF 1.0 on Windows NT 4.0, Windows 2000 Professional and Windows MeWindows 98.
HeaderDeclared in Msctf.idl and Msctf.h.

Send comments about this topic to Microsoft

Build date: 12/17/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker