DISPCONTAINERACTIONCALLBACK Callback Function

#include "ltivw.h"

L_INT pEXT_CALLBACK YourFunction(phBitmapList, uCount, nAction, uMessage, wParam, ptMousePos, pUserData)

HBITMAPLIST L_FAR * phBitmapList;

/* array of bitmap lists */

L_UINT uCount;

/* number of bitmap lists */

L_INT nAction;

/* action ID */

L_UINT uMessage;

/* message */

WPARAM wParam;

/* extended parameter of the message */

POINT L_FAR * ptMousePos;

/* mouse position */

L_VOID L_FAR * pUserData;

/* user data */

This callback function is called each time the user clicks or drags the mouse, rotates the mouse wheel, or presses a keyboard button, if the mouse or keyboard event is associated with a user-defined action. This function is available only in the Medical Imaging Suite toolkits.

Parameter

Description

phBitmapList

An array of bitmap lists that represent all the bitmap lists of all cells selected by the user.

uCount

The number of bitmap lists referenced by phBitmapList.

nAction

Value that indicates the action associated with the mouse or keyboard event. Since this callback is used for user-defined actions, this value should be >= 100.

uMessage

Value that represents the message from either the mouse or the keyboard. Possible values are:

 

WM_KEYDOWN

 

WM_KEYUP

 

WM_LBUTTONDOWN

 

WM_LBUTTONUP

 

WM_MBUTTONDOWN

 

WM_MBUTTONUP

 

WM_MOUSEMOVE

 

WM_MOUSEWHEEL

 

WM_RBUTTONDOWN

 

WM_RBUTTONUP

wParam

Additional message information.

ptMousePos

A point that represents the position of the cursor.

pUserData

A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of L_DispContainerCreate.) Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

A user-defined action is added to a container by calling L_DispContainerSetAction. If a mouse or keyboard event that is associated with a user-defined action occurs, this callback function is called to allow the user to handle the action.

In order to use this callback function, it must first be set by calling L_DispContainerSetActionCallback.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DispContainerSetTagCallBack, L_DispContainerGetTagCallBack, L_DispContainerSetActionCallBack, L_DispContainerGetActionCallBack, DISPCONTAINERTAGCALLBACK

Topics:

Applying Actions

 

Image Viewer Functions: Applying Actions

Example

For an example, refer to L_DispContainerCreate.