Jump to content

Windows Server 2003 (classic theme) and icons


erebus
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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 by JFX
Link to comment
Share on other sites

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?

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...