Jump to content

Recommended Posts

Posted (edited)

I tried to put a "" in the GuiCtrlCreatePic as the filename and update it later. I tried both ...SetData and ..SetImage, but it doesn't display an image if I update it later unless I give it a default image.

Any ideas why this happens? can it be fixed?

Thxs :idiot:

Edited by closeupman
Posted (edited)

I've encountered the same problem, but I solved it by using " " instead of ""..

<{POST_SNAPBACK}>

Ok, I'll try that thanks...drove me nuts! :idiot:

Edit: Nope that didn't work. Won't take the new image I set later. I'm using a workaround right now of having a blank.bmp image for the initial. UNTIL someone can tell me different.

Edited by closeupman
Posted

Ok, I'll try that thanks...drove me nuts! :idiot:

Edit: Nope that didn't work. Won't take the new image I set later. I'm using a workaround right now of having a blank.bmp image for the initial. UNTIL someone can tell me different.

<{POST_SNAPBACK}>

Check the ID return by GuiCtrlCreatePic. I am almost sure it is equal to 0 meaning the control has not been created so GuiCtrlSetImage cannot have a valid ID to reference the pic :D
Posted

Check the ID return by GuiCtrlCreatePic. I am almost sure it is equal to 0 meaning the control has not been created so GuiCtrlSetImage cannot have a valid ID to reference the pic :idiot:

<{POST_SNAPBACK}>

yeah, you're right. If it has a valid filename(my blank image) it returns a valid non-zero handle, if it has the "" or " " it returns Zero as the handle.

So I assume this means u MUST put a pic there unlike the label creation where it can have no text when you create it.

Posted

yeah, you're right. If it has a valid filename(my blank image) it returns a valid non-zero handle, if it has the "" or " " it returns Zero as the handle.

So I assume this means u MUST put a pic there unlike the label creation where it can have no text when you create it.

<{POST_SNAPBACK}>

Hmm..then how did I solve this.

I thought I just used " ", but I will check it out when I get home on Friday.

Please post a solution if you find one.

Good luck !

Posted

Hmm..then how did I solve this.

I thought I just used " ", but I will check it out when I get home on Friday.

Please post a solution if you find one.

Good luck !

<{POST_SNAPBACK}>

You must've done something else, cuz I tried that and did a msgbox right after the pic creation and it gave a value of 0.

My solution is to create a very tiny (filesized and image size) blank image and use that at the initial creation.

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...