Sign in to follow this  
Followers 0
Soulstriker

[Solved] Bitmaps not showing in ListView

2 posts in this topic

#1 ·  Posted (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

screen.PNG

Edited by Soulstriker

Share this post


Link to post
Share on other sites



#2 ·  Posted

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!

screen.PNG

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0