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 );

More by Author

Must Read