L_DispContainerSetRequestedImage

#include "l_bitmap.h"

L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerSetRequestedImage(hCellWnd, pBitmaps, pBitmapIndexes, nLength, uFlags)

Sends the requested images to the control; this function is used when the low memory usage feature is enabled (for more information see the L_DispContainerEnableCellLowMemoryUsage function).

Parameters

L_HWND hCellWnd

A handle to the window that represents the cell on which the function's effect will be applied.

pBITMAPHANDLE pBitmaps

Array of a BITMAPHANDLE  structure that contains the requested frames.

L_INT * pBitmapIndexes

Array of Integers containing the index of each bitmap in pBitmaps in respective manner.

L_INT nLength

Length of the pBitmapIndexes array.

L_UINT uFlags

Flag that indicate how to handle the images set.  Possible values are:

Value Meaning
CONTAINER_SETIMAGE_INSERT [0x00000000] Insert the requested image.
CONTAINER_SETIMAGE_REPLACE [0x00000001] Replace the requested image with the corresponding index.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The low memory usage feature works by making the control stop from loading all of the frames at runtime. Instead, the control will load only the frames that are currently visible on the cell. The control will send a request each time the user scrolls down or up, changes the number of visible frames, etc. For example, suppose the cell layout is a 2X2 (See L_DispContainerSetCellProperties), and the user needs to load more than 100000 frames. Instead of loading them all, this function will send a callback (DISPCONTAINERFRAMEREQUESTEDCALLBACK) when the cell is loaded, requesting 4 frames (1, 2, 3 and 4) (because the cell is 2X2). Once the user scrolls down the cell to view frame number 5, frame number 1 will be disposed of because it is no longer visible, and the callback will be fired to request frame number 5. When frames are requested, the user is supposed to send them to the control using the function L_DispContainerSetRequestedImage.

nHiddenCount allows the control load a specified number of frames ahead (so if you have a 2X2 cell and you set nHiddenCount to 3, the method will request (1, 2, 3, 4, 5, 6, 7). The function will normally request also 0, -1, -2. but since those indexes are not valid, the control will not request them.

If the user does not need to use the low memory usage to load the images, he can use the direct way by sending a bitmap list to the control using the L_DispContainerSetCellBitmapList function.

Required DLLs and Libraries

Platforms

The toolkit comes in Win32 and x64 editions that can support development of software applications for any of the following environments:

Windows 10

Windows 8

Windows 7

Windows Vista

Windows XP

Windows 2000

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.