Setting a non-standard size image

Although icons always have to be a square, the images we use in the list view control does not. For instance, the following code will create images that are 62 pixels wide. The height of the image will be the same as the bitmap height in the resource.

m_img.Create( IDB_CUSTOMBITMAP, 62, 1, (COLORREF)-1 );  
m_listctrl.SetImageList( &m_img, LVSIL_SMALL );


  • How to load Images on demand?

    Posted by Legacy on 02/18/2004 12:00am

    Originally posted by: Mohammad Kamran

    If I have thousands of items to be displayed on ListView with their Images. What I really want is:
    1) Load Only Items without their images in the listview
    2) When the item is displayed in the listview its image
    should be loaded.
    So Is there any event when can tell me this, please help.
    (FYI: I am talking about ListView Control in .Net framework)


    Mohammad Kamran

  • Images of Different size in ListView

    Posted by Legacy on 10/23/2002 12:00am

    Originally posted by: mcdigital

    I am also interested of putting images of different size into a listview or any similar control.
    Is there anybody who have any idea of how this can be done.

  • Wont work in Report View

    Posted by Legacy on 09/16/2001 12:00am

    Originally posted by: Michael Pliam

    I cant get an image list to work in a List Control 'Report View'. See my post

    What am I doing wrong?

  • How to have images of different size into list control

    Posted by Legacy on 09/04/2000 12:00am

    Originally posted by: srivatsan

    How can we add images of different size into the list control. Imagelists does not support different sizes. Is there any other way to do this without using owner drawn list control ???

  • I'd like to have images of 62 pixels high, thus fatter rows.

    Posted by Legacy on 01/13/2000 12:00am

    Originally posted by: Dominic Gamble

    How can this be done?

    I guess all I really need to do is change the height of the row. The earlier article that uses WM_MEASUREITEM doesn't work.


  • how do i add different size bitmaps to an image list

    Posted by Legacy on 12/21/1999 12:00am

    Originally posted by: maty david

    i got some problems adding a different sized bitmaps to an image list. after all an image list is defined to handle same sized bitmaps. i guess that the solution should be changing the size of the bitmap before adding it to the image list, but this i could'nt make...
    thanks for any help

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Not long ago, the biggest concern when considering moving workloads to the cloud was security. Today, the main obstacle to cloud adoption is different but familiar: the pain of migrating data. But, migrating data doesn't have to be painful. Purpose-built tools enable efficient data migration without downtime or the risks for data loss. This eBook summarizes the major pain points for IT pros tasked with performing migrations, breaks down the flaws in traditional approaches, and illustrates how modern tools help …

  • Graph databases are the fastest growing database engine. Their power and popularity stem from how they store their data - with both the data points and relationships between points having equal priority. This natural data storage model makes graph databases an excellent fit for recommendation engines, fraud detection, and deep data analysis. With this session, we approach Graph databases from the perspective of a seasoned SQL user looking to skill up on Graph technology. To make use of graph databases, users …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date