ITfKeystrokeMgr::AdviseKeyEventSink method (msctf.h)
Installs a key event sink to receive keyboard events.
Syntax
HRESULT AdviseKeyEventSink(
[in] TfClientId tid,
[in] ITfKeyEventSink *pSink,
[in] BOOL fForeground
);
Parameters
[in] tid
Identifier of the client that owns the key event sink. This value is obtained by a previous call to ITfThreadMgr::Activate.
[in] pSink
Pointer to a ITfKeyEventSink interface.
[in] fForeground
Specifies if this key event sink is made the foreground key event sink. If this is TRUE, this key event sink is made the foreground key event sink. Otherwise, this key event sink does not become the foreground key event sink.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
One or more parameters are invalid. |
|
The client identified by tid has a key event sink installed. |
Remarks
The foreground key event sink receives all keyboard events. A non-foreground key event sink only receives preserved keys and key events that occur over text that marked owned by the client identifier.
Requirements
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 |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |