Export (0) Print
Expand All

ITfContextKeyEventSink interface

The ITfContextKeyEventSink interface is implemented by a text service to receive keyboard event notifications that occur in an input context. This keyboard event sink differs from the ITfKeyEventSink keyboard event sink in that the keyboard events are passed to ITfContextKeyEventSink after having been preprocessed by the ITfKeyEventSink event sink. Preserved key events and filtered key events are not passed to the ITfContextKeyEventSink event sink.

This event sink is installed by ITfSource::AdviseSink with IID_ITfContextKeyEventSink.

Members

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

Methods

The ITfContextKeyEventSink interface has these methods.

MethodDescription
OnKeyDown

Called when a key down event occurs.

OnKeyUp

Called when a key up event occurs.

OnTestKeyDown

Called to determine if a text service will handle a key down event.

OnTestKeyUp

Called to determine if a text service will handle a key up event.

 

Examples



HRESULT hr;
ITfSource *pSource;

hr = pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->AdviseSink(IID_ITfContextKeyEventSink, NULL, &m_dwContextKeyEventSinkCookie);
    
    pSource->Release();
}




HRESULT hr;
ITfSource *pSource;

hr = pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->UnadviseSink(m_dwContextKeyEventSinkCookie);
    
    pSource->Release();
}


Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Mscandui.dll

See also

ITfContext
ITfSource
ITfSource::AdviseSink

 

 

Community Additions

ADD
Show:
© 2014 Microsoft