MKI_HOOKMOUSE_PROC (Callback)

www.CAD6.com

C++ Syntax

typedef void

(*MKI_HOOKMOUSE_PROC)(

 __int32 f_nWindowNum,

 UINT f_unMessage,

 UINT f_unButtons,

 __int32 f_nXPos,

 __int32 f_nYPos );

 

This callback procedure is called once each time a mouse event occurs.

 

Parameters

f_nWindowNum

[__int32] Zero-based index of the drawing window that is responsible for the event. Valid range: 0 <= Value < MKI_WINDOW_MAX (standard windows) or Value = MKI_WINDOW_VIEW (view window).

f_unMessage

[UINT] Type of mouse event that occurred. Possible values are:

WM_MOUSEMOVE

WM_LBUTTONDOWN

WM_LBUTTONUP

WM_MBUTTONDOWN

WM_MBUTTONUP

WM_RBUTTONDOWN

WM_RBUTTONUP

For a description of these standard mouse events, refer to the windows SDK documentation.

f_unButtons

[UINT] Current button status. Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

VK_CONTROL

Set if the CTRL key is down.

VK_LBUTTON

Set if the left mouse button is down.

VK_MBUTTON

Set if the middle mouse button is down.

VK_RBUTTON

Set if the right mouse button is down.

VK_SHIFT

Set if the SHIFT key is down.

f_nXPos

f_nYPos

[__int32] Current mouse position in pixels, relative to the upper left corner of the drawing window's client area.

 

Comment

A hook on mouse events can be established and cancelled using the procedures MKI_HookMouseStart and MKI_HookMouseEnd.

 

CAD6interface 2026.0 - Copyright 2026 Malz++Kassner® GmbH