Compartilhar via


MouseDown Event

MouseDown Event

Occurs when the mouse pointer is over the InkPicture control and a mouse button is pressed.

Declaration

[C++]

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

Parameters

Button

[in] The button that was pressed.

Shift

[in] The state of the SHIFT key.

pX

[in] The x-coordinate, in pixels, of the IInkCursor object.

pY

[in] The y-coordinate, in pixels, of the IInkCursor object.

Cancel

[in, out] A Boolean value that indicates whether to cancel this event for the parent control.

Value Description
TRUE The MouseDown event is cancelled for the parent control.
FALSE The MouseDown event continues for the parent control.

Remarks

Note: The parameters pX and pY are in pixels, and not the HIMETRIC units that are associated with the ink space coordinate system. This is because this event replaces the related mouse event of an application that is not pen-aware, and that type of application refers only to pixels.

Caution: 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 _IInkPictureEvents interface. The _IInkPictureEvents interface implements the IDispatch Leave Site interface with an identifier of DISPID_IPEMouseDown.

Applies To