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.

ITfKeyTraceEventSink interface

The ITfKeyTraceEventSink interface is implemented by an application or text service to receive key stroke event notifications before the event is processed by the target. This advise sink is installed by calling the thread manager ITfSource::AdviseSink method with IID_ITfKeyTraceEventSink.

Members

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

Methods

The ITfKeyTraceEventSink interface has these methods.

MethodDescription
OnKeyTraceDown

Called when a key down event occurs.

OnKeyTraceUp

Called when a key up event occurs.

 

Remarks

The difference between ITfKeyTraceEventSink and ITfKeyEventSink events is that ITfKeyTraceEventSink events occur before any filtering or processing of the key event occurs. The ITfKeyTraceEventSink events also occur before the target application can process the key event.

Examples



HRESULT hr;
ITfSource *pSource;

hr = pThreadMgr->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->AdviseSink(IID_ITfKeyTraceEventSink, pKeyTraceEventSink, &m_dwKeyTraveEventSinkCookie);
    
    pSource->Release();
}




HRESULT hr;
ITfSource *pSource;

hr = pThreadMgr->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->UnadviseSink(m_dwKeyTraveEventSinkCookie);
    
    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

Tiptsf.dll

See also

IUnknown
ITfKeyEventSink
ITfSource::AdviseSink

 

 

Show:
© 2016 Microsoft