Internet-Explorer-Icon ändern

  • Hallo,

    in diesem Thread hier: https://autoit.de/index.php?page…dern#post128152
    wurde von "funkey" gezeigt, wie man das Icon einer laufenden-Nicht-AutoIt-Anwendung ändern kann.

    Die Funktion (und der Aufruf dazu) sind diese hier:

    Spoiler anzeigen
    [autoit]

    _GUISetIcon(WinGetHandle("[ACTIVE]", ""), "shell32.dll", 322) ; name, not ordinal value

    [/autoit] [autoit][/autoit] [autoit]

    Func _GUISetIcon($hGui, $sModule, $iName) ; for loaded modules in this shape

    [/autoit] [autoit][/autoit] [autoit]

    Local $a_hCall = DllCall("kernel32.dll", "hwnd", "GetModuleHandleW", "wstr", $sModule)

    [/autoit] [autoit][/autoit] [autoit]

    Local $hModule = $a_hCall[0]

    [/autoit] [autoit][/autoit] [autoit]

    $a_hCall = DllCall("user32.dll", "hwnd", "LoadImageW", _
    "hwnd", $hModule, _
    "int", $iName, _
    "dword", 1, _ ; IMAGE_ICON
    "int", 32, _
    "int", 32, _
    "dword", 0) ; LR_DEFAULTCOLOR

    [/autoit] [autoit][/autoit] [autoit]

    Local $hIcon = $a_hCall[0]

    [/autoit] [autoit][/autoit] [autoit]

    DllCall("user32.dll", "hwnd", "SendMessageW", _
    "hwnd", $hGui, _
    "dword", 0x0080, _ ; WM_SETICON
    "dword", 0, _ ; 1 = ICON_BIG, 0 = ICON_SMALL
    "ptr", $hIcon)

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_GUISetIcon

    [/autoit]


    Das funktioniert bei vielen Programmen super, bei manchen aber leider nicht. Und auch nicht beim Internet-Explorer.

    Hat jemand vielleicht eine Idee, wie man das hinbiegen kann?

    Vielen Dank für Hilfe
    Trainer