PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: paulDiagnos on June 19, 2008, 08:41:46 AM

Title: Bitmap in listview
Post by: paulDiagnos on June 19, 2008, 08:41:46 AM
Another Question.. sorry.

Is it possible to (instead of icons) populate a listview with bitmap images.

and if so how

thanks again paul.
Title: Re: Bitmap in listview
Post by: paulDiagnos on June 19, 2008, 11:34:00 AM
After all my experimenting, I have concluded I am a moron.
the reason this code didnt work was because the bmp i wanted to display 1.bmp

was not in the DIR!! grr so mad

hImageList = ImageList_Create(128, 128, %ILC_COLORDDB, 2, 1)     ' use 32, 32 for Large Icons
   
ImageList_SetBkColor hImageList, GetSysColor(%COLOR_WINDOW)                         
                       
hTemp   = LoadImage(ByVal %Null, ByCopy "1.bmp", %IMAGE_BITMAP, 0, 0,%LR_LOADTRANSPARENT Or %LR_LOADMAP3DCOLORS Or %LR_DEFAULTSIZE     Or %LR_LOADFROMFILE)   
iImage1 = ImageList_Add(hImageList,hTemp , 0 )
DestroyIcon hTemp
Title: Re: Bitmap in listview
Post by: TechSupport on June 19, 2008, 12:16:25 PM
Quote from: paulDiagnos on June 19, 2008, 11:34:00 AM
After all my experimenting, I have concluded I am a moron.

:D

Also, instead of DestroyIcon you should use DeleteObject because you want to release the handle of a bitmap rather than an icon.
Title: Re: Bitmap in listview
Post by: paulDiagnos on June 19, 2008, 12:20:50 PM
Thanks :-) didnt spot that one.

me thinks im having a bad day. haha

cheers Paul.
Title: Re: Bitmap in listview
Post by: paulDiagnos on June 24, 2008, 11:51:20 AM
Also Any chance of a example on how to use drag and drop with this, (im dragging acros to a treeview from a list view)


I found the zip file on the site that was recommented, but not sure how to use in in FF

cheers Paul.