Jump to content

images to dll?


crzftx
 Share

Recommended Posts

I have a program which is constantly changing an image. I tried using GUICtrlDelete() and GUICtrlCreatePic(), and I also tried using GUICtrlSetImage and GUICtrlSetPos(), but both were very slow. I found that icons are much faster, and I used GConvert to make my .gif's into .ico's into one dll. It worked, but the images look terrible, not very close to their originals. What is some better software to use for this task or how can I make a very fast image change?

Link to comment
Share on other sites

I have a related question to topic title

is there any way we can put Picture in a Dll file and is there a way we can use the GUICtrlSetImage to choose witch picture in the Dll file to use (the Dll should contain more that one picture) ?

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Link to comment
Share on other sites

OMG

what the h** is going on with me today

excuse me for my bad Phrasing, (don't judge me by my bad English)

constantly changing an image

I think it's clear !! what u mean

all what I was doing is asking in the same topic so I don't have to make a new topic to a related question

so all the info can be found in the same topic eventually it will be useful for all the other members !

I've searched the help file for my question !, didn I say something wrong!

all what I want is a Dll with some pictures not icons and to be able to choose from different pictures in the same Dll file

I'm out of words

sorry if u misunderstood me

Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Link to comment
Share on other sites

In Scite press Ctrl+F1 then go to Extra Utilities/AutoIt3Wrapper/Directives available:

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico
Link to comment
Share on other sites

#AutoIt3Wrapper_res_Icon_Add=C:\Users\Nathan\Desktop\ICO\1.ico

MsgBox(0,"File Exists?",FileExists("C:\Users\Nathan\Desktop\ICO\1.ico"))

(I tried every way I could think of, that's why there are seven)

Icons are inside EXE and not as file C:\Users\Nathan\Desktop\ICO\1.ico

You must use apropriate functions for usinf them, for example GUICtrlSetImage, GUICtrlCreateIcom, ..

.

You can check icons inside EXE by ResHacker utility.

Link to comment
Share on other sites

Icons are inside EXE and not as file C:\Users\Nathan\Desktop\ICO\1.ico

But when I looked inside (using Microsoft or GConvert) there are just the three icons that are normally there

The last line of my example was only prove that I was using a legitimate file name

Link to comment
Share on other sites

I tried that, but that still only showed 3 icons

v.3.2.10.0

#AutoIt3Wrapper_res_Icon_Add=E:\Program Files\AutoIt3\Aut2Exe\Icons\autoit_old1.ico

If Not FileExists("E:\Program Files\AutoIt3\Aut2Exe\Icons\autoit_old1.ico") Then
    MsgBox(0x30,"The file never existed.","")
    Exit
EndIf


GUICreate("test",100,100)
GUICtrlCreateIcon(@ScriptFullPath,-1,0,0,50,50)
GUICtrlCreateIcon(@ScriptFullPath,-2,50,0,50,50)
GUICtrlCreateIcon(@ScriptFullPath,-3,0,50,50,50)
GUICtrlCreateIcon(@ScriptFullPath,-4,50,50,50,50)
GUISetState()

While 1
    If GUIGetMsg() = -3 Then _
    Exit
WEnd
Link to comment
Share on other sites

I tried that, but that still only showed 3 icons

v.3.2.10.0

Post whole Scite output - from compilation.

I suppose you don't have reshacker.exe in "C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\" directory.

It should look like:

>"C:\PROGRAM FILES\AUTOIT3\SCITE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "C:\zz.au3" /autoit3dir "C:\Program Files\AutoIt3"

+>02:30:18 Starting AutoIt3Wrapper v.1.9.4

>Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3

+>02:30:19 AU3Check ended.rc:0

>Running:(3.2.10.0):C:\Program Files\AutoIt3\aut2exe\aut2exea.exe

+>02:30:19 Aut2exe.exe ended.rc:0

+> Adding Icon 3 to the Output executable.

+>02:30:20 RC.exe ended.rc:0

+>02:30:21 ResHacker ended.rc:0

>Running (3.1.0.0): C:\Program Files\AutoIt3\aut2exe\upx.exe

+>02:30:23 UPX.exe ended.rc:0

+>02:30:23 AutoIt3Wrapper Finished

Exit code: 0 Time: 6.435

Edited by Zedna
Link to comment
Share on other sites

Well thank you very much! You solved my problem, I was unaware that a right-click on the icon and clicking "compile" wasn't adequate.

But when you mentioned the SciTe output (I didn't realize I could compile through SciTe), I found it and tried it, all icons present.

That did work perfectly, but the images are still the same poor quality as they were using a dll... is it possibly because I'm using 50x50 and not 64x64, or some other normal windows size?

Edited by crzftx
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...