| Customize Help
| Save Settings

MdispGetHookInfo



Function Map
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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
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.

function map For retrieving information regarding mouse events
Click to summarizeInfoType Description
UserVarPtr
- Possible values returned
Click to summarize M_MOUSE_POSITION_BUFFER_X

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

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value

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

Click to summarize M_MOUSE_POSITION_BUFFER_Y

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

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value

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

Click to summarize M_MOUSE_POSITION_X

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

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

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

Click to summarize M_MOUSE_POSITION_Y

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

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

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

Click to summarize 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)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize 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.

function map For retrieving information regarding keyboard events
Click to summarizeInfoType Description
UserVarPtr
- Possible values returned
Click to summarize M_KEY_VALUE

Retrieves the operating system's key code for the keyboard key that triggered the event.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

Specifies the key code.

Click to summarize M_MIL_KEY_VALUE

Retrieves the MIL operating system-independent key code for the keyboard key that triggered the event. Note, this value can only be retrieved if the hook-handler function was called due to the M_KEY_DOWN or M_KEY_UP event.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_KEY_ADD

Specifies the Add key (+).

Click to summarize M_KEY_ARROW_DOWN

Specifies the Down Arrow key.

Click to summarize M_KEY_ARROW_LEFT

Specifies the Left Arrow key.

Click to summarize M_KEY_ARROW_RIGHT

Specifies the Right Arrow key.

Click to summarize M_KEY_ARROW_UP

Specifies the Up Arrow key.

Click to summarize M_KEY_BACK

Specifies the Back key.

Click to summarize M_KEY_CLEAR

Specifies the Clear key.

Click to summarize M_KEY_DECIMAL

Specifies the Period key located on your number pad.

Click to summarize M_KEY_DELETE

Specifies the Delete key.

Click to summarize M_KEY_DIVIDE

Specifies the Divide key (/).

Click to summarize M_KEY_END

Specifies the End key.

Click to summarize M_KEY_ESC

Specifies the Esc key.

Click to summarize M_KEY_EXECUTE

Specifies the Execute key.

Click to summarize M_KEY_Fn

Specifies the n key, where n is a value from 1 to 24.

Click to summarize M_KEY_HOME

Specifies the Home key.

Click to summarize M_KEY_INSERT

Specifies the Insert key.

Click to summarize M_KEY_MULTIPLY

Specifies the Multiply key (*).

Click to summarize M_KEY_n

Specifies the n key, where n is a value from 0 to 9.

Click to summarize M_KEY_NUM_LOCK

Specifies the Num Lock key.

Click to summarize M_KEY_NUMPADn

Specifies the n key, where n is a value from 0 to 9.

Click to summarize M_KEY_PAGEDOWN

Specifies the Pagedown key.

Click to summarize M_KEY_PAGEUP

Specifies the Pageup key.

Click to summarize M_KEY_PAUSE

Specifies the Pause key.

Click to summarize M_KEY_RETURN

Specifies the Return key (Enter).

Click to summarize M_KEY_SCROLL_LOCK

Specifies the Scroll Lock key.

Click to summarize M_KEY_SEPARATOR

Specifies the Separator key.

Click to summarize M_KEY_SPACE

Specifies the Space key.

Click to summarize M_KEY_SUBTRACT

Specifies the Subtract key (-).

Click to summarize M_KEY_TAB

Specifies the Tab key.

Click to summarize M_KEY_xxx

Specifies the letter key xxx, where xxx can be a letter from A to Z.

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.

function map For retrieving information regarding either a mouse or keyboard event
Click to summarizeInfoType Description
UserVarPtr
- Possible values returned
Click to summarize M_COMBINATION_KEYS

Retrieves which combination keys or mouse buttons triggered the event. Note that a combination of the values below can be returned. Bitwise operators must be used to establish the specific keys or buttons pressed.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT MORE
Click to summarize M_KEY_ALT

Specifies the Alt key.

Click to summarize M_KEY_CTRL

Specifies the Ctrl key.

Click to summarize M_KEY_SHIFT

Specifies the Shift key.

Click to summarize M_KEY_WIN

Specifies the Windows key.

Click to summarize M_MOUSE_LEFT_BUTTON

Specifies the left mouse button.

Click to summarize M_MOUSE_MIDDLE_BUTTON

Specifies the middle mouse button.

Click to summarize 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 MIL KEY VALUE KEY ADD KEY ARROW DOWN KEY ARROW LEFT KEY ARROW RIGHT KEY ARROW UP KEY BACK KEY CLEAR KEY DECIMAL KEY DELETE KEY DIVIDE KEY END KEY ESC KEY EXECUTE KEY Fn KEY HOME KEY INSERT KEY MULTIPLY KEY n KEY NUM LOCK KEY NUMPADn KEY PAGEDOWN KEY PAGEUP KEY PAUSE KEY RETURN KEY SCROLL LOCK KEY SEPARATOR KEY SPACE KEY SUBTRACT KEY TAB KEY xxx COMBINATION KEYS KEY ALT KEY CTRL KEY SHIFT KEY WIN MOUSE LEFT BUTTON MOUSE MIDDLE BUTTON MOUSE RIGHT BUTTON M_KEY_Fn M_KEY_n M_KEY_NUMPADn M_KEY_xxx