Sign in to follow this  
Followers 0
sandin

shell.32 giving 2 diferent icons with same ID?

6 posts in this topic

look at theese 2 script examples:

#Include <Constants.au3>
#NoTrayIcon
TraySetIcon("Shell32.dll",198)
TraySetState()

While 1
    sleep(10)
WEndoÝ÷ Ù«­¢+Ù½ÁÐ ÅÕ½Ðí5ÕÍѱÉYÉÌÅÕ½Ðì°Ä¤((¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(%¹±Õ±ÐíÕ¥MÑÑÕÍ È¹ÔÌÐì()1½°ÀÌØíÕ¤°ÀÌØíMÑÑÕÍ  ÈÄ°ÀÌØíµÍ)1½°ÀÌØí}AÉÑÍI¥¡ÑlÍtôlÄÀÀ°ÌÔÀ°´Åt)1½°ÀÌØí}AÉÑÍQáÑlÍtôlÅÕ½Ðí9ÜQáÐÅÕ½Ðì°ÅÕ½Ðí5½ÉQáÐÅÕ½Ðì°ÅÕ½ÐíÙ¸5½ÉQáÐÅÕ½Ðít((ÀÌØíÕ¤ôU%
ÉÑ ÅÕ½ÐíMÑÑÕÌ    ÈÐ%½¸ÅÕ½Ðì°ÔÀÀ°´Ä°´Ä°´Ä°ÀÌØí]M}M%i   =((ÀÌØíMÑÑÕÍ ÈÄô}U%
ÑɱMÑÑÕÍ É
ÉÑ ÀÌØíÕ¤°ÀÌØí}AÉÑÍI¥¡Ñ°ÀÌØí}AÉÑÍQáФ)}U%
ÑɱMÑÑÕÍ ÉMÑ%½¸ ÀÌØíMÑÑÕÍ    ÈÄ°Ä°ÅÕ½ÐíÍ¡±°Ìȹ±°ÅÕ½Ðì°Ääà¤)}U%
ÑɱMÑÑÕÍ ÉMÑ%½¸ ÀÌØíMÑÑÕÍ    ÈÄ°À°ÅÕ½ÐíÍ¡±°Ìȹ±°ÅÕ½Ðì°Ääà¤)}U%
ÑɱMÑÑÕÍ ÉMÑ%½¸ ÀÌØíMÑÑÕÍ    ÈÄ°È°ÅÕ½ÐíÍ¡±°Ìȹ±°ÅÕ½Ðì°Ääà¤()}U%
ÑɱMÑÑÕÍ ÉMÑQáÐ ÀÌØíMÑÑÕÍ    ÈÄ°}U%
ÑɱMÑÑÕÍ ÉÑ%½¸ ÀÌØíMÑÑÕÍ ÈÄ°À¤°À¤)}U%
ÑɱMÑÑÕÍ ÉMÑQáÐ ÀÌØíMÑÑÕÍ    ÈÄ°}U%
ÑɱMÑÑÕÍ ÉÑ%½¸ ÀÌØíMÑÑÕÍ ÈİĤ°Ä¤)}U%
ÑɱMÑÑÕÍ ÉMÑQáÐ ÀÌØíMÑÑÕÍ    ÈÄ°}U%
ÑɱMÑÑÕÍ ÉÑ%½¸ ÀÌØíMÑÑÕÍ ÈİȤ°È¤()U%MÑMÑÑ¡M]}M!=¤()]¡¥±Ä($ÀÌØíµÍôU%Ñ5Í ¤(%M±Ð($%
ÍÀÌØíµÍôÀÌØíU%}Y9Q}IM%i($$%}U%
ÑɱMÑÑÕÍ ÉIÍ¥é ÀÌØíMÑÑÕÍ ÈĤ($%
ÍÀÌØíµÍôÀÌØíU%}Y9Q}
1=M($$%á¥Ñ1½½À($%
ͱÍ($$$ììììì(%¹M±Ð($)]¹

they are both using "shell.32" file and calling icon with ID: 198, but both giving 2 diferent icons. In the older version of the scite my script was using the right icons from shell.32 file, but now I got totaly diferent icons that doesn't match the shell.32 ID's, why's that?

Share this post


Link to post
Share on other sites



try with the latest beta

opt("MustDeclareVars", 1)

#include <GUIConstants.au3>
#Include <GuiStatusBar.au3>

Local $gui, $StatusBar1, $msg
Local $a_PartsRightEdge[3] = [100, 350, -1]
Local $a_PartsText[3] = ["New Text", "More Text", "Even More Text"]

$gui = GUICreate("Status Bar Get Icon", 500, -1, -1, -1, $WS_SIZEBOX)

$StatusBar1 = _GUICtrlStatusBar_Create ($gui, $a_PartsRightEdge, $a_PartsText)
_GUICtrlStatusBar_SetIcon($StatusBar1, 1, 198, "shell32.dll")
_GUICtrlStatusBar_SetIcon($StatusBar1, 0, 198, "shell32.dll")
_GUICtrlStatusBar_SetIcon($StatusBar1, 2, 198, "shell32.dll")

_GUICtrlStatusBar_SetText($StatusBar1, _GUICtrlStatusBar_GetIcon($StatusBar1, 0), 0)
_GUICtrlStatusBar_SetText($StatusBar1, _GUICtrlStatusBar_GetIcon($StatusBar1, 1), 1)
_GUICtrlStatusBar_SetText($StatusBar1, _GUICtrlStatusBar_GetIcon($StatusBar1, 2), 2)

GUIRegisterMsg($WM_SIZE, "WM_SIZE")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            ;;;;;
    EndSelect
   
WEnd

; Resize the status bar when GUI size changes
Func WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam)
    _GUICtrlStatusBar_Resize ($StatusBar1)
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SIZE

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

ty, but the second example script is giving the right icons, the first one doesn't. On this page: http://www.autoitscript.com/autoit3/ there is a picture of a window "Icon selector", nexto to the GUI help file example. How can I access this "Icon Selector"? Maybie in there I can pick the right icons.

Normally C:\Program Files\AutoIt3\Examples\GUI\Advanced\enumicons.au3


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

thank you!!!

it appeared that older scite version was using ordinal value from the shell32.dll file to pick icons, and the new one is using resource name for selecting icons from shell32.dll

should have nothing to do with scite, it's the autoit version, there were changes made to how icons were handled.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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