RagnaroktA Posted November 14, 2006 Posted November 14, 2006 I upgraded to the latest beta today, and all of the GUICtrlCreateIcon calls in my script display nothing now... Anyone else have this issue? Current Projects:Remote Administration Suite Updated! 12-20-07Remote User State Migration Tool (Plugin) Updated! 12-20-07Batch Print Wizard Updated! 12-20-07Links:AutoIt Beta | AutoIt Wiki
Paulie Posted November 14, 2006 Posted November 14, 2006 I upgraded to the latest beta today, and all of the GUICtrlCreateIcon calls in my script display nothing now... Anyone else have this issue?If this is an error, it belongs in Bug reports, but don't put it there unless you can give us some example code that reproduces the error.
jpm Posted November 14, 2006 Posted November 14, 2006 I upgraded to the latest beta today, and all of the GUICtrlCreateIcon calls in my script display nothing now... Anyone else have this issue?Check the doc the ordinal numbering as change
RagnaroktA Posted November 14, 2006 Author Posted November 14, 2006 If this is an error, it belongs in Bug reports, but don't put it there unless you can give us some example code that reproduces the error. It doesnt throw any errors, it just will not display the icon in the GUI. Here's the code: Global $sRASUIDLL = @ScriptDir & "\RASUI.dll" GUICtrlCreateIcon ($sRASUIDLL, 98, 10, 12, 30, 30) The syntax hasnt changed from version to version, hence the reason I was wondering if someone else has these problems... Current Projects:Remote Administration Suite Updated! 12-20-07Remote User State Migration Tool (Plugin) Updated! 12-20-07Batch Print Wizard Updated! 12-20-07Links:AutoIt Beta | AutoIt Wiki
jpm Posted November 15, 2006 Posted November 15, 2006 It doesnt throw any errors, it just will not display the icon in the GUI. Here's the code: Global $sRASUIDLL = @ScriptDir & "\RASUI.dll" GUICtrlCreateIcon ($sRASUIDLL, 98, 10, 12, 30, 30) The syntax hasnt changed from version to version, hence the reason I was wondering if someone else has these problems...As Larry I don't have the rasui.dl either but try GUICtrlCreateIcon ($sRASUIDLL, -98, 10, 12, 30, 30) or a minus number around it as it is the modification we did to have a good support of reference by number/name of the selectd icon.
RagnaroktA Posted November 15, 2006 Author Posted November 15, 2006 (edited) As Larry I don't have the rasui.dl either but try GUICtrlCreateIcon ($sRASUIDLL, -98, 10, 12, 30, 30) or a minus number around it as it is the modification we did to have a good support of reference by number/name of the selectd icon.I'll attach it when I get to the office... I did try your suggestion, and it displayed an icon, but the wrong one... The thing is, the call to that dll everywhere else in the script is working flawlessly, but CreateIcon is borked...RASUI.dllEdit: I see what adding the - did... and it's working now using -99 instead of 98... Any ideas what the problem is? Why wont it display properly, but all of the other calls to that particular icon work? Edited November 15, 2006 by RagnaroktA Current Projects:Remote Administration Suite Updated! 12-20-07Remote User State Migration Tool (Plugin) Updated! 12-20-07Batch Print Wizard Updated! 12-20-07Links:AutoIt Beta | AutoIt Wiki
fuwi Posted December 6, 2006 Posted December 6, 2006 i've made the same experience with GUICtrlCreateIcon in v3.2.1.13#include <GUIConstants.au3> GUICreate("Icons in Shell32.dll",910,800) $ExitBtn = GUICtrlCreateButton("",840,740,40,40, $BS_ICON) GUICtrlSetImage(-1,"Shell32.dll",27) $X = 20 $Y = 25 $Count = 0 For $i = 0 To 237 $icon = GUICtrlCreateIcon("shell32.dll",$i, $X, $Y) $label = GUICtrlCreateLabel($i, $X+10, $Y+35,30,14) $X = $X + 40 $Count = $Count + 1 If $Count = 22 Then $Count = 0 $X = 25 $Y = $Y + 67 EndIf Next GUISetState () While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $Msg = $ExitBtn Then ExitLoop Wendthe code above executed with v 3.2.1.2 (and earlier) i get this result:and with v3.2.1.13 i get this:regards,fuwi
fuwi Posted December 7, 2006 Posted December 7, 2006 thanks Larry, but i'm a little bit confused now... why must i set the IconID for GUICtrlSetImage to 27, and the IconID for GUICtrlCreateIcon to -28 for accessing the same shell32.dll-icon in both functions? in the helpfile, the explanation for the IconID is identical for both functions. furthermore, in the help for both functions i read: "iconID can reference the icon group number. Use a resource hacker to know the value." but accessing e.g. the the icon group number 8240 works only for GUICtrlCreateIcon $ExitBtn = GUICtrlCreateButton("",200,50,40,40, $BS_ICON) GUICtrlSetImage(-1,"Shell32.dll", 8240) shows a blank button fuwi
Gordon J. Tyler Posted January 1, 2007 Posted January 1, 2007 I've found this to be even more confusing with v3.2.2.0 and I had to make the following changes in my script:For controls created with GUICtrlCreateIcon() use GUICtrlSetImage(($num + 1) * - 1) to change the iconFor controls created with GUICtrlCreateButton() use GUICtrlSetImage($num) to change the iconSo... GUICtrlSetImage() actually acts differently based on the control type (icon vs. button) I don't like it, but at least I understand what it's doing now.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now