ITfMouseSink::OnMouseEvent method (msctf.h)

Called when a mouse event occurs over a range of text.

Syntax

HRESULT OnMouseEvent(
  [in]  ULONG uEdge,
  [in]  ULONG uQuadrant,
  [in]  DWORD dwBtnStatus,
  [out] BOOL  *pfEaten
);

Parameters

[in] uEdge

Contains the offset, in characters, of the mouse position from the start of the range of text. For more information, see the Remarks section.

[in] uQuadrant

Contains the zero-based quadrant index, relative to the edge, that the mouse position lies in. For more information, see the Remarks section.

[in] dwBtnStatus

Indicates the mouse button state at the time of the event. See the wParam parameter of the WM_MOUSEMOVE message for possible values.

[out] pfEaten

Pointer to a BOOL that, on exit, indicates if the mouse event was handled. If this value receives TRUE, the mouse event was handled. If this value is FALSE, the mouse event was not handled.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.

Remarks

The caller should translate double-click events into multiple mouse button down events. This enables a text service to detect double-click events even if the context window does not support double-clicks.

uEdge contains the offset, in characters, of the mouse position from the start of the text range. The mouse position is always rounded to the closest edge. Each edge is divided into four equal quadrants with two quadrants preceding the edge and two quadrants following the edge. uQuadrant contains the zero-based quadrant index of the mouse position. In the figure below, point "X" is in quadrant 2 of edge 1 and point "Y" is in quadrant 1 of edge 3.

Quadrant relationship to edge of a range of text

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

ITfMouseTracker::AdviseMouseSink

ITfMouseTrackerACP::AdviseMouseSink

WM_MOUSEMOVE