erebus Posted August 31, 2010 Posted August 31, 2010 Hello guys, I am trying to display icons on buttons which are saved in an ICL file. I have already achieved that, tested on Windows 7. However when running my script on a Windows Server 2003 (classic theme of course), there are not icons. For example, I use the following code: $Buttonstart = GUICtrlCreateButton(" Start", 65, 405, 140, 40, $WS_TABSTOP) GUICtrlSetImage($Buttonstart, "myfile.icl", 1) GUICtrlSetFont($Buttonstart, 10, 800, -1, "Tahoma") GUICtrlSetOnEvent($Buttonstart, "DoTheJob") GUICtrlSetState($Buttonstart, $GUI_DEFBUTTON) There are 5 icons in the ICL file, with 9 formats each (48x48, 32x32, 16x16 - RGB/A, 256 and 16 colours). Should I include any other format in the ICL for my icons? Also, the icons are not displayed not even ON the gui (apart from the button) using the GUICtrlCreateIcon. So, I believe it is a resolution/formatting problem. Don't my current formats cover Windows 2003? And how can I select a specific format out of the ICL file (ok I know the ID, but can't I pick a specific format from an ID)? Thanks a lot.
JFX Posted September 1, 2010 Posted September 1, 2010 (edited) Would be easier to help if you could upload this ICL. Since vista icons are often packed as png, what XP/2003 would not understand. Just noticed GUICtrlCreateIcon completely failed under XP x64 when using an higher index than 0. Can you make a screenshot of this gui on your Win2003? It's maybe the same there. GUICreate("", 600, 250) For $Y = 1 To 4 For $X = 1 To 4 GUICtrlCreateIcon('shell32.dll',$x + $y * 4 -4, 5+$X*74-64, 5+$Y*64-64, 32, 32) GUICtrlCreateButton("",300+$X*74-64,5+$Y*64-64,42,42,0x8040) GUICtrlSetImage(-1, 'shell32.dll',$x + $y * 4 -4) Next Next GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then ExitLoop WEnd GUIDelete() Edited September 1, 2010 by JFX
erebus Posted September 1, 2010 Author Posted September 1, 2010 I attach the screenshots and the ICL. You can see the missing icons are marked. Haven't tried the x64 icon bug though. You should mention it! Have you compiled with the x86 or the x64 tools to reproduce the bug? Thank you so far.icons.zip
JFX Posted September 1, 2010 Posted September 1, 2010 Okay your ICL is correct. Have Made a bug ticket. Do you can confirm that under your Win 2003, my posted code only show 16 Icons on the right side instead all 32?
erebus Posted September 1, 2010 Author Posted September 1, 2010 Okay your ICL is correct.Have Made a bug ticket.Do you can confirm that under your Win 2003, my posted code only show 16 Icons on the right side instead all 32?That's correct, your code produces only 16 icons under Windows 2003.So it's clearly a bug, right?
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