Soulstriker Posted August 25, 2017 Share Posted August 25, 2017 (edited) Hi all! I'm trying to add some beauty to my listview by including some images. I've been trying to make some tests but for some reason the bitmap doesn't show. Here's the code I'm using. #include <WinAPI.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <Constants.au3> #Include <WinAPI.au3> _Main() Func _Main() GUICreate("ImageList AddBitmap", 400, 300) $listview = GUICtrlCreateListView("Items", 2, 2, 394, 268) GUISetState() ; Load images $hImage = _GUIImageList_Create(32,32) _GUIImageList_AddBitmap($hImage, @ScriptDir & "\ok-16.bmp") _GUICtrlListView_SetImageList($listview, $hImage, 1) ; Add items _GUICtrlListView_AddItem($listview, "Item 1") ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main I attached the bmp file and a screenshot of what I'm seeing. What am I doing wrong? Thank you! ok-16.bmp Edited August 25, 2017 by Soulstriker Link to comment Share on other sites More sharing options...
Soulstriker Posted August 25, 2017 Author Share Posted August 25, 2017 So apparently there was a problem with the format of my bitmaps, now it's working. Sorry if I made somebody loss their time. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now