Moin,
ich verwende in einem Skript .ico-Dateien als Button-Icons, klappt soweit. Packe ich nun die .ico's in eine .dll und greife auf diese zu, werden die Icons zwar im Button dargestellt, allerdings um einiges kleiner. Es handelt sich nicht um "multiple icons", sie liegen also auch nur in einer Größe vor.
Gibt es eine Möglichkeit, auf die Icons in der dll zuzugreifen und gleichzeitig die "richtige" Größe zu behalten oder muss ich bei den .ico-Dateien bleiben?
Zur Verdeutlichung hier ein Beispielskript, im Anhang Skript + Icon-datei + Icon-dll.
Besten Dank im Voraus!
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 345, 307, 282, 145)
$Button1 = GUICtrlCreateButton("Button1", 64, 80, 80, 80, BitOR($BS_ICON,$WS_GROUP))
GUICtrlSetImage(-1, @WorkingDir&"\1.ico")
$Button2 = GUICtrlCreateButton("Button2", 200, 80, 80, 80, BitOR($BS_ICON,$WS_GROUP))
GUICtrlSetImage(-1, @WorkingDir&"\icons.dll", 1)
$Label1 = GUICtrlCreateLabel("Aus .ico-Datei", 72, 48, 70, 17)
$Label2 = GUICtrlCreateLabel("Aus .dll", 208, 48, 102, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd