L_DispContainerUpdateCellView

#include "l_bitmap.h"

L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerUpdateCellView(hCon, hWnd nCellIndex, uFlags)

HDISPCONTAINER hCon;

/* handle to the container */

HWND hWnd;

/* handle to a window */

L_INT nCellIndex;

/* index of a cell */

L_UINT uFlags;

/* reserved for future use */

Recalculates the cells internal values in order to update the view according to the new change made on the image.

Parameter

Description

hCon

Handle to the container.

hWnd

Handle of the window being updated. This handle can be obtained from L_DispContainerGetCellWindowHandle. If you set this parameter, nCellIndex will be ignored. If you set this parameter to NULL, you must set a valid value to nCellIndex or it will return Error_inv_parameter.

nCellIndex

A zero-based index of the cell, which is being updated. Pass -1 to update the view of all cells managed by the container. Pass -2 to update the view of the selected cells managed by the container. If you set hWnd parameter to a value, this parameter will be ignored.

uFlags

Reserved for future use. Pass 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function is useful when the user applies a certain effect on the cell image that causes the image dimensions to change.

This function will also repaint the cell. To repaint the cell only with recalculated internal data, use the L_DispContainerRepaintCell function.

To stop repainting while applying a series of effects without refreshing each time an effect is applied, use the function L_DispContainerBeginUpdate to stop the cell from repainting, and then use the function L_DispContainerBeginUpdate to repaint everything.

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.

Platforms

Windows 95 / 98 / Me; Windows 2000 / XP; Windows CE.

See Also

Functions:

L_DispContainerCreate, L_DispContainerDestroy, L_DispContainerRepaintCell, L_DispContainerBeginUpdate, L_DispContainerEndUpdate

Topics:

Using the Image Viewer

 

Image Viewer Functions: Using the Image Viewer

Example

This example resizes the first frame of the first cell.

#if defined (LEADTOOLS_V16_OR_LATER)
L_INT DispContainerUpdateCellViewExample(HDISPCONTAINER hCon)
{
   L_INT        nRet;
   BITMAPHANDLE Bitmap;

   nRet = L_DispContainerGetBitmapHandle(hCon, 0, 0, &Bitmap, 0);
   if (nRet != SUCCESS)
      return nRet;

   L_SizeBitmapInterpolate(&Bitmap, BITMAPWIDTH(&Bitmap) * 2, BITMAPHEIGHT(&Bitmap), 0);

   L_DispContainerSetBitmapHandle(hCon, 0, 0, &Bitmap, TRUE, 0);

   L_DispContainerUpdateCellView(hCon, 0, 0, 0);

   return SUCCESS;
}
#endif