Jump to content

Image in GUI loaded from resource of executable


Recommended Posts

Hello.

I am beginner in AutoIT. I tried create some functional scripts.

Now I want to create program with GUI. I tested SampleControls.au3.

The problem is that image is loaded from external file.  

GUICtrlCreatePic("logo.gif", 0, 0, 120, 284)

I read wiki, tried google, but nothing relevant I did not find.

My question: Is it possible to load image from resource of executable (new created .exe from .au3 script)?

If yes, please give me link to wiki or write me, how can I do it.

I can see it in recource of another programs.

CONTROL "", 105, STATIC, SS_BITMAP | SS_REALSIZEIMAGE | WS_CHILD | WS_VISIBLE, 0, 0, 70, 175

Thanks.

Edited by uTorrentCZ
Link to comment
Share on other sites

  • 10 months later...

I know this thread is old, but I'm having trouble getting things working the UDF. I made sure I have the full version of SciTE and AutoIT3Wrapper.

I tested with the first sample script (as-is with a specific image defined) that sets the jpg to the resource, then sets GUICtrlCreatePic to "" and pulls with _ResourceSetImageToCtrl.  

Resource Hacker is showing TEST_JPG_1 in the file,  but when I run the compiled exe it returns  Error: Subscript used on non-accessible variable.

Any idea what the issue could be?

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