| MIL 10 Reference
| Customize Help
| Save Settings

MdispGetHookInfo



See also
Reference:
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Get information about a display hook event.
Syntax
MIL_INT MdispGetHookInfo(
MIL_ID EventId, //in
MIL_INT64 InfoType, //in
void *UserVarPtr //out
)
Description

This function allows you to get information about the event that caused the hook-handler function to be called. MdispGetHookInfo() should only be called within the scope of a display hook-handler function (see MdispHookFunction()).

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
EventId

Specifies the display event identifier received by the hook-handler function (see MdispHookFunction()).

InfoType

Specifies the type of information about the event to return.

See the Parameter associations section for possible values that can be specified.

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • MIL_DOUBLE
  • MIL_INT

Specifies the address in which to write the requested information.

See the Parameter associations section for possible values that can be returned.

The tables below list possible values for the InfoType parameter and possible values returned to the UserVarPtr parameter.

If the hook-handler function was called due to an M_MOUSE_... event type, the InfoType parameter can be set to one of the values below.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For retrieving information regarding mouse events
CollapseInfoType Description
UserVarPtr
- Possible values returned
Collapse M_MOUSE_POSITION_BUFFER_X

Retrieves the X-position of the cursor, in buffer coordinates.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value

Specifies the X-position of the cursor, in buffer coordinates.

Collapse M_MOUSE_POSITION_BUFFER_Y

Retrieves the Y-position of the cursor, in buffer coordinates.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value

Specifies the Y-position of the cursor, in buffer coordinates.

Collapse M_MOUSE_POSITION_X

Retrieves the X-position of the cursor, in display coordinates.

(summarize)
Collapse Value

Specifies the X-position of the cursor, in display coordinates.

Collapse M_MOUSE_POSITION_Y

Retrieves the Y-position of the cursor, in display coordinates.

(summarize)
Collapse Value

Specifies the Y-position of the cursor, in display coordinates.

Collapse M_MOUSE_WHEEL_VALUE

Retrieves the value for the mouse wheel's rotation. Note, this value can only be retrieved if the hook-handler function was called due to the M_MOUSE_WHEEL event.

(summarize)
Collapse Value

Specifies the value for the mouse wheel's rotation. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotate backward, toward the user.

(summarize)

If the hook-handler function was called due to an M_KEY_... event type, the InfoType parameter can be set to the value below.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For retrieving information regarding keyboard events
CollapseInfoType Description
UserVarPtr
- Possible values returned
Collapse M_KEY_VALUE

Retrieves the ASCII value of the key that triggered the event.

(summarize)
Collapse Value

Specifies ASCII value of the key that triggered the event.

If the hook-handler function was called due to either an M_KEY_... or M_MOUSE_... event type, the InfoType parameter can be set to the value below.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For retrieving information regarding either a mouse or keyboard event
CollapseInfoType Description
UserVarPtr
- Possible values returned
Collapse M_COMBINATION_KEYS

Retrieves the combined value of keys or mouse buttons that triggered the event, if multiple keys or mouse buttons are used. The value returned will be a bitwise combination of the following.

(summarize)
Collapse M_KEY_CTRL

Specifies the Ctrl key.

Collapse M_KEY_SHIFT

Specifies the Shift key.

Collapse M_MOUSE_LEFT_BUTTON

Specifies the left mouse button.

Collapse M_MOUSE_MIDDLE_BUTTON

Specifies the middle mouse button.

Collapse M_MOUSE_RIGHT_BUTTON

Specifies the right mouse button.

Return value
The returned value is M_NULL if successful. If the operation fails, a non-null (!M_NULL) value is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll; mildisplay.dll.
MOUSE POSITION BUFFER X MOUSE POSITION BUFFER Y MOUSE POSITION X MOUSE POSITION Y MOUSE WHEEL VALUE KEY VALUE COMBINATION KEYS KEY CTRL KEY SHIFT MOUSE LEFT BUTTON MOUSE MIDDLE BUTTON MOUSE RIGHT BUTTON