|
List View Image Lists
The icons for list view items are contained in image lists, which you create
and assign to the list view control. One image list contains the full-sized
icons used in icon view, and a separate image list contains smaller versions of the
same icons for use in other views. You can also specify a third image list
that contains state images, which are displayed next to an item's icon to indicate an application-defined
state.
You assign an image list to a list view control by using the LVM_SETIMAGELIST message, specifying whether the image list contains full-sized icons, small
icons, or state images. You can use the GetSystemMetrics function to determine appropriate dimensions for the full-sized and small
icons and the ImageList_Create function to create the image lists. For more information about image lists,
see Image Lists.
You can retrieve the handle of an image list currently assigned to a list view
control by using the LVM_GETIMAGELIST message.
The full-sized and small icon image lists typically contain icons for each
type of list view item. You do not need to create both of these image lists if
only one is used for example, if a list view control is never in icon view. If you create both
image lists, they must contain the same images in the same order because a
single value is used to identify a list view item's icon in both image lists.
The full-sized and small icon image lists can also contain overlay images, which are designed to be superimposed on item icons. A nonzero value in bits
8 through 11 of a list view item's state specifies the one-based index of an
overlay image (zero indicates no overlay image). Because a 4-bit, one-based index
is used, overlay images must be among the first 15 images in the image lists.
For more information about list view item states, see Item States.
If a state image list is specified, a list view control reserves space to the
left of each item's icon for a state image. An application can use state
images, such as checked and cleared check boxes, to indicate application-defined item
states. A nonzero value in bits 12 through 15 specifies the one-based index of
a state image (zero indicates no state image). State images are typically not
used in icon view.
By default, a list view control destroys the image lists assigned to it when
it is destroyed. However, if a list view control has the LVS_SHAREIMAGELISTS
window style, the application is responsible for destroying the image lists when
they are no longer in use. You should specify this style if you assign the same
image lists to multiple list view controls; otherwise, more than one control
might try to destroy the same image list.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|