Post by Brandon Parker on Sept 15, 2019 19:25:17 GMT -5
Here are a couple of functions that will help you along. It will definitely help out if you search around for the ListView examples that I have thrown out there since the programming style will obviously be the same.
Function createImageList(sizeX, sizeY, flags, numImages, canGrowBy) CallDLL #comctl32, "ImageList_Create", sizeX As long, _ sizeY As long, _ flags As ulong, _ numImages As long, _ canGrowBy As long, _ createImageList As ulong End Function
Function addImageToImageList(hImageList, hBitmap, hBitmapMask) CallDLL #comctl32, "ImageList_Add", hImageList As ulong, _ hBitmap As ulong, _ hBitmapMask As ulong, _ addImageToImageList As long End Function
You will need to send the LVM_SETIMAGELIST message to the ListView, along with the appropriate information, after you create the control.
Here is another tip. You will most likely want to use the LVSIL_SMALL constant. The value of LVSIL_SMALL is 1; it is not a constant that is included within Liberty BASIC so you will have to either use a hard coded one or make a variable for it.
I hope that will help you get started with what you hope to accomplish.