Halloooo Leute,
ich hab mich seit gestern mall mit GDI+ bescheftigt.
Und ich kamm auch gleich ein Problem.
Ich möchte ein(alle) Bild(er) als button benutzen.
hier mein aktueller versuch
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GDIPlus.au3>
#include <Array.au3>
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
Opt("GUIOnEventMode", 1)
$w = 0
$h = 0
$i = 0
#Region ### START Koda GUI section ### Form=
$hGUI = GUICreate("Form1", 800, 800, -1, -1,$WS_POPUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_GDIPlus_Startup()
$cDummy1 = GUICtrlCreateDummy()
While 1
$i += 1
$rand = Random (0,1 ,1)
if $rand == 0 Then
$rand = "rot.png"
Else
$rand = "gruen.png"
EndIf
$hBitmap = _GDIPlus_BitmapCreateFromFile ($rand)
$hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
_GDIPlus_GraphicsDrawImage ($hGraphic, $hBitmap,$w, $h)
GUICtrlSetOnEvent(-1, "_test")
$w +=10
if $w == 800 Then
$h += 10
$w = 0
ElseIf $h == 800 then
MsgBox (0,0,$i)
ExitLoop
EndIf
WEnd
$cDummy2 = GUICtrlCreateDummy()
While 1
WEnd
[/autoit] [autoit][/autoit] [autoit]func _test()
msgbox(0,0,0)
EndFunc
func _end()
_GDIPlus_ImageDispose($hBitmap)
_GDIPlus_Shutdown()
EndFunc
ich würde mit euch wetten das jemmand mir sagen kann wie ich das machen kann.
Gruß Nitrama
PS: die "_ end" funktion geht auch nicht
PSS: bilder sind im anhang