Wie schon gesagt geht die Transparenz beim Umwandeln zu GDI+ verloren
Zeichne die Icons am besten mit _WinAPI_DrawIconEx:
Spoiler anzeigen
#include <WinAPI.au3>
[/autoit] [autoit][/autoit] [autoit]$hIcon = _WinAPI_PrivateExtractIcon(@SystemDir & "\calc.exe", 0, 256, 256)
[/autoit] [autoit][/autoit] [autoit]$hGui = GUICreate("Test", 256, 256)
GUISetBkColor(0x00AA00)
GUISetState()
$hDC = _WinAPI_GetDC($hGui)
[/autoit] [autoit][/autoit] [autoit]_WinAPI_DrawIconEx($hDC, 0, 0, $hIcon, 256, 256)
[/autoit] [autoit][/autoit] [autoit]While GUIGetMsg() <> -3
Sleep(20)
WEnd
_WinAPI_DestroyIcon($hIcon)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _WinAPI_PrivateExtractIcon($sIcon, $iIndex, $iWidth, $iHeight)
[/autoit] [autoit][/autoit] [autoit]Local $hIcon, $tIcon = DllStructCreate('hwnd'), $tID = DllStructCreate('hwnd')
Local $Ret = DllCall('user32.dll', 'int', 'PrivateExtractIcons', 'str', $sIcon, 'int', $iIndex, 'int', $iWidth, 'int', $iHeight, 'ptr', DllStructGetPtr($tIcon), 'ptr', DllStructGetPtr($tID), 'int', 1, 'int', 0)
If (@error) Or ($Ret[0] = 0) Then
Return SetError(1, 0, 0)
EndIf
$hIcon = DllStructGetData($tIcon, 1)
If ($hIcon = Ptr(0)) Or (Not IsPtr($hIcon)) Then
Return SetError(1, 0, 0)
EndIf
Return $hIcon
EndFunc ;==>_WinAPI_PrivateExtractIcon