Jump to content
Sign in to follow this  
closeupman

Pic control

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 !

Share this post


Link to post
Share on other sites

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.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...