Jump to content

Recommended Posts

Posted (edited)

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
Posted

;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)

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
×
×
  • Create New...