Jump to content

_GUIImageList_AddBitmap()


DarkBoost
 Share

Recommended Posts

Hi I have used the following command _GUIImageList_AddBitmap and added a macro @tempdir and found it will not pickup the image, however if I add a variable or direct path it works fine. I tested with @desktopdir with same results, so it appears to be with macro's not @tempdir specifically. Anyone else ran into this?

Edited by DarkBoost
Link to comment
Share on other sites

;WORKS

$file = "c:\image.bmp"

$button = GUICtrlCreateButton("",60,130,88,68)

$image = _GUIImageList_Create(80,60,5,1)

_GUIImageList_AddBitmap($image,$file)

_GUICtrlButton_SetImageList($button,$image)

;FAILS

$file = @TempDir & "\image.bmp"

$button = GUICtrlCreateButton("",60,130,88,68)

$image = _GUIImageList_Create(80,60,5,1)

_GUIImageList_AddBitmap($image,$file)

_GUICtrlButton_SetImageList($button,$image)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...