LImageViewer::GetActionCount

#include "ltwrappr.h"

L_INT LImageViewer::GetActionCount (pnCount, uFlags);

L_INT * pnCount;

/* pointer to the variable to be updated */

L_UINT uFlags;

/* reserved for future use */

Gets the number of actions associated with the container.

Parameter

Description

pnCount

Pointer to a variable to be updated with number of actions associated with the container.

uFlags

Reserved for future use. Pass 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Call LImageViewer::AddAction to add an action to a container and call LImageViewer::RemoveAction to remove an action from the container.

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:

LImageViewer::AddAction, LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members

Topics:

Using the Image Viewer

 

Window Control/Image Viewer Functions: Using the Image Viewer

Example

Remove the actions and remove all the cells and the bitmap lists attached.

L_INT LImageViewer_GetActionCountExample(LImageViewer& ImageViewer) 
{
   L_INT    uCount; 
   L_UINT   nRet = 0 ; 
   // Check if there is any action added to the container. 
   nRet = ImageViewer.GetActionCount(&uCount, 0); 
   if(nRet != SUCCESS)
      return nRet;
   // Remove all the actions. 
   if (uCount != 0) 
   {
      nRet = ImageViewer.RemoveAction(-1, 0); 
      if(nRet != SUCCESS)
         return nRet;
   }
   // Check if there is any cell inserted to the container. 
   uCount = ImageViewer.GetCellCount(0); 
   // Remove all the cells, along with the attached images. 
   if (uCount != 0) 
   {
      nRet = ImageViewer.RemoveCell(-1, TRUE, 0); 
      if(nRet != SUCCESS)
         return nRet;
   }
   return SUCCESS;
}