Partilhar via


Imagelist.count Method

Definition

Retrieves the number of images in an image list.

public:
 virtual int count();
public virtual int count ();
abstract member count : unit -> int
override this.count : unit -> int
Public Overridable Function count () As Integer

Returns

An integer that represents the number of images in the list.

Remarks

The following example creates an image list, loads icons from the shell.dll file, and then prints the number of images in the list.

Imagelist list; 
int       counter; 
list = new Imagelist( 
   Imagelist::iconWidth(), 
   Imagelist::iconHeight() ); 
list.loadIcons('shell32.dll'); 
print list.count(); 
pause;

Applies to