Using the ImageList Control

LEADTOOLS provides an ImageList control for manipulating and displaying a list of images. When the LTLST dll loads, it registers a window class (LTIMGLISTCLASS) for you. You can then create windows of this class using the LEADTOOLS function L_CreateImageListControl, using the Windows C API CreateWindow, or in your application's Resource Script file (.RC) using code such as the following:

CONTROL  ",IDC_IMGLIST,LTIMGLISTCLASS,WS_CHILD|WS_BORDER|WS_VISIBLE,10,10,100,100

If you create the control using CreateWindow, or in your application's .RC file, you must make sure the LTLST dll is loaded in your application's InitInstance function. You can use the LEADTOOLS function L_UseImageListControl to insure the dll is loaded.

Once the control has been created, you can send messages to the control to insert items, remove items, update/replace items and sort the items. You can also send messages to change the item display attributes such as scroll style, item spacing, item display size, and how items that have the selected attribute are displayed. You can also send message to export a number of bitmaps from the ImageList Control to a Bitmap List and send a message to insert a list of bitmaps into the ImageList Control. The image list control can automatically select items for you when the user clicks on an item using the mouse, or you can send messages to the control to set an item's selected attribute. For more information, see ImageList Control Messages.

To make sending messages easier, LEADTOOLS also provides function-like macros. For a complete list of available macros, refer to the Ltlst.h file.

The ImageList Control also sends notification messages of certain events to its parent window. These notifications are sent in the form of a WM_COMMAND message. These messages notify the parent window of events such as focus changes, scrolling, click & double-click events, and when an item has been selected by the user. For more information, see ImageList Control Command Notifications.

To destroy the control when your application no longer needs it, you can use the Windows function DestroyWindow.

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

LEADTOOLS Raster Imaging C API Help