Sign in to follow this  
Followers 0
komalo

need help in GUICtrlSetImage

6 posts in this topic

hi , i have a problem with GUICtrlSetImage , when trying ti set the value in iconname to 127 , it is not loaded

here's the code

GUICreate("listview items", 800, 600, 100, 100, -1)
$button = GUICtrlCreateButton("komsalo", 399, 528, 209, 31,$BS_ICON)
GUICtrlSetImage($button,"C:\WINDOWS\system32\shell32.dll",127)
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE

so does GUICtrlSetImage have an icon index limit ?

please help


[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites



Hmm... I get the same result (no icon and just text), though ResHacker shows a nice printer icon as number 127 (windows XP's shell32.dll) or a flatscreen monitor (Vista's shell32.dll)...

Note: I'm running on Vista Business 32 bits NL - didn't test it in any other Windows version.

I wonder if anyone else knows this.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Hmm... I get the same result (no icon and just text), though ResHacker shows a nice printer icon as number 127 (windows XP's shell32.dll) or a flatscreen monitor (Vista's shell32.dll)...

Note: I'm running on Vista Business 32 bits NL - didn't test it in any other Windows version.

I wonder if anyone else knows this.

see , that's what i am talking about , i don't know if autoit can't determine icons after a specific icon index ?


[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites

see , that's what i am talking about , i don't know if autoit can't determine icons after a specific icon index ?

It sure can... Use index 133 or higher and it gives you icons again :)


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Have you got the include for $BS_ICON

#include <ButtonConstants.au3>

EDIT: Actually I just looked at the icons on my comp (XP home) and 127 is blank. -127 has a folder icon.

What version of windows are you using?

post-25580-1213878018_thumb.jpg

Edited by LongBowNZ

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