InkPicture.CursorInRange event

Occurs when a cursor enters the physical detection range (proximity) of the tablet context.


void CursorInRange(
  [in] IInkCursor   *Cursor,
  [in] VARIANT_BOOL NewCursor,
  [in] VARIANT      ButtonsState


Cursor [in]

The IInkCursor object that generated the CursorInRange event.

NewCursor [in]

VARIANT_TRUE if this is the first time this ink collector has come in contact with the IInkCursor object that generated the CursorInRange event; otherwise, VARIANT_FALSE.

ButtonsState [in]

The state of the buttons for the cursor that generated the CursorInRange event.

For more information about the VARIANT structure, see Using the COM Library.

Return value

This event does not return a value.


This event method is defined in the _IInkCollectorEvents, _IInkOverlayEvents, and _IInkPictureEvents dispatch-only interface (dispinterfaces) with an ID of DISPID_ICECursorInRange.

The CursorInRange event is fired even when in select or erase mode, not just when in ink mode. This requires that you monitor the editing mode (which you are responsible for setting) and be aware of the mode before interpreting the event. The advantage of this requirement is greater freedom to innovate on the platform through greater awareness of platform events.


Minimum supported client

Windows XP Tablet PC Edition [desktop apps only]

Minimum supported server

None supported


Msinkaut.h (also requires Msinkaut_i.c)



See also

CursorOutOfRange Event
InkCursorButtonState Enumeration
IInkCursor Interface