Hey Community,
habe ein kleines Verständnisproblem mit den Graphics.
Skript:
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
$Form1 = GUICreate("Form1", 600,600)
GUISetBkColor(0x000000)
_Box(80,200)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _Box($x, $y)
$first = GUICtrlCreateGraphic(0, 0, $x, $y)
GUICtrlSetBkColor(-1, 0xa0ffa0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $x, $y)
$second = GUICtrlCreateGraphic($x,$y)
GUICtrlSetStyle(-1, $SS_NOTIFY)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, '0xFFF','0xDEDEDE')
GUICtrlSetGraphic(-1, $GUI_GR_RECT, $x, $y, 60, 60)
$Label1 = GUICtrlCreateLabel("Test", $x ,$y, 52, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x808000)
EndFunc
Wieso werden, nachdem die Graphic $first gezeichnet wurde, die Koordinaten von Graphic $second auf die von $first dazu addiert?
Ich möchte eigentlich beide Graphics von Fensterkoordinaten aus zeichen.
EDIT: Die Graphic $second sollte an der Stelle von dem $Label1 gezeichnet werden.