ITfMouseTracker::AdviseMouseSink method (msctf.h)
Installs a mouse event sink.
Syntax
HRESULT AdviseMouseSink(
[in] ITfRange *range,
[in] ITfMouseSink *pSink,
[out] DWORD *pdwCookie
);
Parameters
[in] range
Pointer to an ITfRange interface that specifies the range of text that the mouse sink is installed for.
[in] pSink
Pointer to the ITfMouseSink interface.
[out] pdwCookie
Pointer to a DWORD value that receives a cookie that identifies the mouse 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 context object is not on a document stack. |
|
The context owner does not support mouse event sinks. |
|
An unspecified error occurred. |
Remarks
When the advise sink is installed, a mouse event that occurs over the range specified by range will result in the mouse event sink ITfMouseSink::OnMouseEvent call.
The value placed in pdwCookie must be saved and passed to ITfMouseTracker::UnadviseMouseSink to remove the mouse event sink.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | msctf.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |