Jump to content
Sign in to follow this  
star2

guictrlsetimage, images in Dll Resources

Recommended Posts

star2

I have the following Dll file

images.dll file contains:
image-1 ID 1
image-2 ID 2
image-3 ID 3

how can we do something like this:

$button1 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button1 , "images.dll",1)
$button2 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button , "images.dll",2)
$button3 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button , "images.dll",3)
GUISetState ()

let's say the following form

( controlID, filename [, image or icon name [, icontype]] )

EDIT: maybe this should be in the request forum

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]

Share this post


Link to post
Share on other sites
martin

I have the following Dll file

images.dll file contains:
image-1 ID 1
image-2 ID 2
image-3 ID 3

how can we do something like this:

$button1 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button1 , "images.dll",1)
$button2 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button , "images.dll",2)
$button3 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button , "images.dll",3)
GUISetState ()

let's say the following form

( controlID, filename [, image or icon name [, icontype]] )

EDIT: maybe this should be in the request forum

I don't understand what the question is.

What is wrong with the first block of code? Or are you saying it doesn't work?

Or do you want to know how to have a function with parameters like the line in the second code block to replace the GuiCtrlSetImage lines in the first block?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
star2

did u try something like this?

I want the button witch the style was $bs_bitmap to use the image from the file image.dll

witch contains some images each one has a unique ID

$button3 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button , "images.dll",3)

EDIT: note, I'm not working with icons I'm working iwth images

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]

Share this post


Link to post
Share on other sites
martin

did u try something like this?

I want the button witch the style was $bs_bitmap to use the image from the file image.dll

witch contains some images each one has a unique ID

$button3 = GUICtrlCreateButton ("", 20 ,20 ,200,200,$bs_bitmap)
GUICtrlSetImage ($button , "images.dll",3)

EDIT: note, I'm not working with icons I'm working iwth images

No, I didn't try anything I just wasn't clear what you were asking.

If you have got the images then I would think Zedna's Resource solution would do what you want.

EDIT:Spelling

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
star2

No, I didn't try anything I just wasn't clear what you were asking.

If you have got the images then I would think Zedan's Resource solution would do what you want.

why does it have to be like this?

why not add this to the guictrlsetimage ?


[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]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.