L_DispContainerRemoveAction

#include "ltivw.h"

L_INT EXT_FUNCTION L_DispContainerRemoveAction(hCon, nAction, uFlags)

HDISPCONTAINER hCon;

/* handle to the container */

L_INT nAction;

/* action ID */

L_UINT uFlags;

/* reserved for future use */

Removes the specified action from the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter

Description

hCon

Handle to the container.

nAction

Value that represents the action to be removed. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it should be one of these predefined actions.

 

CONTAINER_ACTION_WINDOWLEVEL

[1] Window leveling

 

CONTAINER_ACTION_SCALE

[2] Scaling

 

CONTAINER_ACTION_OFFSET

[3] Offset

 

CONTAINER_ACTION_STACK

[4] Stacking

 

CONTAINER_ACTION_MAG

[5] Magnifying glass

 

CONTAINER_ACTION_ALPHA

[6] Alpha

uFlags

Reserved for future use. Must be zero.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

When an action is removed from a container, all properties, mouse buttons, and keystroke combinations are also removed.

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_DispContainerAddAction, L_DispContainerSetAction, L_DispContainerSetActionProperties, L_DispContainerGetActionProperties, L_DispContainerGetActionCount, L_DispContainerSetKeyboardAction, L_DispContainerGetKeyboardAction, L_DispContainerIsActionActive, L_DispContainerGetActionCallBack, L_DispContainerSetActionCallBack

Topics:

Applying Actions

 

Image Viewer Functions: Applying Actions

Example

// This function checks whether the action is assigned to a keyboard shortcut or not, if not the function removes it. 
L_VOID RemoveInActiveAction(HWND hWnd, HDISPCONTAINER hCon, L_INT nAction) 
{
   L_BOOL bActive; 
   L_UINT uVk1, uVk2, uVk3, uVk4, uModifiers; 

   // Is the action added to the image viewer. 
   bActive = L_DispContainerIsActionActive (hCon, nAction, 0); 
   if (!bActive) 
   {
      // Check whether a keyboard shortcut is assigned to the action or not. 
      L_DispContainerGetKeyboardAction(hCon, nAction, CONTAINER_MOUSEMOVE_DOWN, &uVk1, &uModifiers, 0); 
      L_DispContainerGetKeyboardAction(hCon, nAction, CONTAINER_MOUSEMOVE_DOWN, &uVk2, &uModifiers, 0); 
      L_DispContainerGetKeyboardAction(hCon, nAction, CONTAINER_MOUSEMOVE_DOWN, &uVk3, &uModifiers, 0); 
      L_DispContainerGetKeyboardAction(hCon, nAction, CONTAINER_MOUSEMOVE_DOWN, &uVk4, &uModifiers, 0); 

      // If there is no keyboard shortcut assigned to the action the function will remove it. 
      if ((!uVk1) && (!uVk2) && (!uVk3) && (!uVk4)) 
         L_DispContainerRemoveAction (hCon, nAction, 0); 
   }
   else
   {
      MessageBox(hWnd, TEXT("This action is not added to the image viewer"), TEXT("Error!"), MB_OK);
   }
}