Sign in to follow this  
Followers 0
TaPuZ

How to get a jpg embeded in a dll?

17 posts in this topic

Hi.

I've read so much, hoping being able to use that damned dll! But I don't understand anything!

Who should be able to explain to an old stupid froggy how to do so?

Let's try with an easy shoot :

I've embeded 'toto.jpg' in 'toto.dll'

And, in my code, I want to do a splash image with the 'toto.jpg' from 'toto.dll'

Is it even possible?

Thanks a lot for reading and/or helping.

T@PµZ.

Share this post


Link to post
Share on other sites



Look at Zedna's resource UDF, it should provide what you need :D (do a search)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanx a lot for all thoses replies...

I've already read that topic, and I would be glad to do that way... But, how?

I don't even fulfill in embeding my jpg in my exe... :D

I think I should use thoses two lines.

#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, test_1.txt, rcdata, TEST_TXT_1, 0

_ResourceGetAsImage($ResName, $ResType = $RT_RCDATA, $DLL = -1)

For the directories, C:\images\toto.jpg

C:\Code\code.au3

Let's say I want to put my toto.jpg, in my code.exe

and in my code, make a splashimage with the toto.jpg.

How to do so?

Edited by TaPuZ

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

What's wrong with examples in my post?

Just look at resource_test_min1.au3 - very simple example script for using UDF

--> it's exactly for you

Edited by Zedna

Share this post


Link to post
Share on other sites

What's wrong with examples in my post?

Just look at resource_test_min1.au3 - very simple example script for using UDF

--> it's exactly for you

What's wrong?

Nothing but me, I suppose.

When I compile it, with the 'F7', I don't see my pic.

#AutoIt3Wrapper_useupx=n

#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, D:\images\toto.jpg, rcdata, TEST_JPG_1, 0

#AutoIt3Wrapper_run_after=upx.exe --best --compress-resources=0 "%out%"

#include "resources.au3"

$gui = GUICreate("Data from resources simple example 1",400,150)

$pic1 = GUICtrlCreatePic("",0,0,400,150)

_ResourceSetImageToCtrl($pic1, "TEST_JPG_1") ; set JPG image to picture control from resource

GUISetState(@SW_SHOW)

While 1

If GUIGetMsg() = -3 Then Exit

WEnd

Do I forget something?

Have I to change a parameter to adapt it?

Share this post


Link to post
Share on other sites

Having images and stuff in another file (res dll) is good thing because it makes really easy job implement skins, change style, add one, refresh visual style and so on...

This is of course for installed applications.

If your app will be of different kind than it should carry everything with it self.

... and will not use ini files (never did understand ini obsession of some AutoIt scripters)


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

INI files are brilliant for small apps.

If one would extended part or two of that statement to its full length I guess it would even hold water. I find very hard to connect what you wrote.

INI files are leftovers of some past times used by stubborn peoples. Registry is there for that purposes.

Even if they are used it should be for installed applications only.

But, like some other stuff this is obviously a matter of a personal taste.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

It can also be dangerous to write to the registry.

Ahha, so you wanted to say: "INI files are brilliant for people who don't know what they do."

We live in dangerous times. Adopt.

And that's why Vista is good.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

What are we talking about? :D


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

I sincerely want to thank all of you (inners and outers topics writers :D ), because all the answers were precious for my understanding.

Everything is ok for me now, but do not hesitate to write other answers.

Yhankx again.

Best Regards,

T@PµZ.<

Share this post


Link to post
Share on other sites

Hé hé, you ask in the two forum ...

I think that now you have all of your responses. :D


Best Regards.Thierry

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  
Followers 0