ITfKeyTraceEventSink interface (msctf.h)
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.
The ITfKeyTraceEventSink interface inherits from the IUnknown interface. ITfKeyTraceEventSink also has these types of members:
The ITfKeyTraceEventSink interface has these methods.
ITfKeyTraceEventSink::OnKeyTraceDown ITfKeyTraceEventSink::OnKeyTraceDown method |
ITfKeyTraceEventSink::OnKeyTraceUp ITfKeyTraceEventSink::OnKeyTraceUp method |
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.
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();
}
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | msctf.h |
Redistributable | TSF 1.0 on Windows 2000 Professional |