InkOverlay.MouseDown event

Occurs when the mouse pointer is over the InkCollector or InkOverlay object and a mouse button is pressed.


void MouseDown(
  [in]      InkMouseButton           Button,
  [in]      InkShiftKeyModifierFlags Shift,
  [in]      long                     pX,
  [in]      long                     pY,
  [in, out] VARIANT_BOOL             *Cancel


Button [in]

The mouse button that was pressed.

Shift [in]

The state of the SHIFT key.

pX [in]

The X-coordinate, in pixels, of a mouse click.

pY [in]

The Y-coordinate, in pixels, of a mouse click.

Cancel [in, out]

VARIANT_TRUE to cancelt he event forthe parent control; otherwise, VARIANT_FALSE. The default value is VARIANT_FALSE

Return value

This event does not return a value.


To improve real-time ink performance, hide or show the mouse cursor in the MouseDown and MouseUp event handlers.

Note  The properties pX and pY are in pixels, and not the HIMETRIC units that are associated with the ink space. This is because this event replaces the related mouse event of a pen-unaware application and this type of application understands only pixels.
Note  Some controls rely on a specific relationship between MouseDown, MouseMove, and MouseUp events. Canceling some of these events may have unanticipated results.

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


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

InkOverlay Class
InkMouseButton Enumeration
InkShiftKeyModifierFlags Enumeration
MouseUp Event