ITfMouseTrackerACP::AdviseMouseSink method (msctf.h)

Called to install a mouse event sink.

Syntax

HRESULT AdviseMouseSink(
  [in]  ITfRangeACP  *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. The application must increment this object reference count and save the interface.

[out] pdwCookie

Pointer to a DWORD that receives a cookie that identifies the mouse event sink.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
One or more parameters are invalid.
E_NOTIMPL
The application does not support mouse event sinks.

Remarks

When this advise sink is installed, a mouse event that occurs over the range specified by range will result in the mouse event sink ITfMouseSink::OnMouseEvent method being called.

The value placed in pdwCookie will be saved by the caller and passed to the ITfMouseTrackerACP::UnadviseMouseSink method 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

See also

ITfMouseSink

ITfMouseSink::OnMouseEvent

ITfMouseTrackerACP

ITfMouseTrackerACP::UnadviseMouseSink

ITfRange