Hallo,
ich möchte gerne mein GUI mit einem Hintergrundbild verbessern
aber ich bekomme einen Fehler, wenn ich das Bild deaktiviert kurz nachdem erstellen des GUIs erstelle.
Damit das Bild keine Controls überlagert, hab ich an den Anfang gesetzt, bevor alle anderen Ctrls erstellt werden.
Damit die Ctrls auch bedienbar bleiben haben ich das Bild deaktiviert.
$MainGUI = GUICreate($sTitle, 753, 1024, 200, 107)
$BG = GUICtrlCreatePic(@ScriptDir & "\bg5.jpg", 0, 0, 753, 590)
GUICtrlSetState($BG, $GUI_DISABLE)
$MGroup1 = GUICtrlCreateGroup("Modis", 8, 8, 521, 75)
GUICtrlSetOnEvent(-1, "Radio")
$MRadio1 = GUICtrlCreateRadio("Einbuchen", 16, 28, 73, 17)
GUICtrlSetOnEvent(-1, "Radio")
$MRadio2 = GUICtrlCreateRadio("Ausbuchen", 16, 53, 75, 17)
GUICtrlSetOnEvent(-1, "Radio")
$MRadio3 = GUICtrlCreateRadio("Editieren", 111, 28, 63, 17)
GUICtrlSetOnEvent(-1, "Radio")
$MRadio4 = GUICtrlCreateRadio("Filtern", 194, 28, 47, 17)
GUICtrlSetOnEvent(-1, "Radio")
$MCombo3 = GUICtrlCreateCombo("", 434, 20, 89, 25)
....
....
Func _WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg
Local $hWndFrom, $iIDFrom, $iCode, $hWndInput
Local $nNotifyCode = BitShift($iwParam, 16)
If Not IsHWnd($MInput2) Then $hWndMInput2 = GUICtrlGetHandle($MInput2)
If Not IsHWnd($MInput1) Then $hWndMInput1 = GUICtrlGetHandle($MInput1)
$hWndFrom = $ilParam
$iIDFrom = _WinAPI_LoWord($iwParam)
$iCode = _WinAPI_HiWord($iwParam)
; Wenn layer den $nNotifyCode = 1 - entspricht Linker Mausklick - empfängt
If $hWndFrom = $box And $nNotifyCode = 1 Then
$indexB = _GUICtrlListBox_GetCurSel($box) ; Index des angeklickten items wird gespeichert
UpdateCTRLs($indexB) ; die anderen Ctrls werden durch die zur Artikebez. gehörenden Informationen ergänzt
ControlSetText($SenseGui, '', $SenseCtrl, _GUICtrlListBox_GetText($box, $indexB)) ; der Inhalt des Input-Ctrls wird um die vollst. Artikelbez. ergänzt
GUISetState(@SW_HIDE, $guiBox) ; versteckt das Layer-Objekt
$show = False
EndIf
Switch $hWndFrom
Case $MInput1, $hWndMInput1
Switch $iCode
Case $EN_CHANGE
....
....
Aus irgendeinem Grund kennt Autoit die ganzen Ctrls nicht mehr ($Minput1, $Minput2 usw.)
Fehlermeldung: ==> Variable used without being declared:
If Not IsHWnd(^ ERROR
Anhang: Bild ohne deaktiviertes Fenster.