Hallo Autoit.de Community!
Habe folgendes Problem..
Ich programmiere seit einer Weile an meinem neuen Skript Aut OS rum...
Jetzt hab ich die Ausschalt Combo (Guictrlcreatecombo) mit einer GUICtrlComboBoxEx ersetzt...
Warum funktioniert jetzt nicht mehr Guictrlsetonevent?
Screenshot im Anhang
Spoiler anzeigen
Func _GUI_Exit()
$_GUI_Exit = GUICreate("Beenden", 139, 23, $Width-(139+10), $Height-(23*2+10), BitOR($WS_CAPTION,$WS_POPUP,$WS_BORDER,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
GUISetBkColor( $BG_Color )
Global $_FGUI_Exit_Combo_Exit = _GUICtrlComboBoxEx_Create ($_GUI_Exit, "", 0, 0, 139, 100, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetOnEvent(-1,"_FGUI_Exit_Combo_Exit")
$nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd",$_GUI_Exit, "int", 0xEC)
DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $_GUI_Exit, "int", 0xEC, "int", BitOR($nExStyle[0], $WS_EX_MDICHILD))
DllCall("user32.dll", "int", "SetParent", "hwnd", $_GUI_Exit, "hwnd", $hGUI)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]$hImage = _GUIImageList_Create (16, 16, 5, 3)
For $x = 0 To 146
_GUIImageList_AddIcon ($hImage, @SystemDir & "\shell32.dll", $x)
Next
_GUIImageList_Add ($hImage, _GUICtrlComboBoxEx_CreateSolidBitMap ($_FGUI_Exit_Combo_Exit, 0xFF0000, 16, 16))
_GUIImageList_Add ($hImage, _GUICtrlComboBoxEx_CreateSolidBitMap ($_FGUI_Exit_Combo_Exit, 0x00FF00, 16, 16))
_GUIImageList_Add ($hImage, _GUICtrlComboBoxEx_CreateSolidBitMap ($_FGUI_Exit_Combo_Exit, 0x0000FF, 16, 16))
_GUICtrlComboBoxEx_SetImageList ($_FGUI_Exit_Combo_Exit, $hImage)
_GUICtrlComboBoxEx_InitStorage ($_FGUI_Exit_Combo_Exit, 150, 300)
[/autoit] [autoit][/autoit] [autoit]_GUICtrlComboBoxEx_BeginUpdate ($_FGUI_Exit_Combo_Exit)
[/autoit] [autoit][/autoit] [autoit]_GUICtrlComboBoxEx_AddString ($_FGUI_Exit_Combo_Exit,"1 Benutzer abmelden",44,44)
_GUICtrlComboBoxEx_AddString ($_FGUI_Exit_Combo_Exit,"3 Programm beenden...",27,27)
_GUICtrlComboBoxEx_EndUpdate ($_FGUI_Exit_Combo_Exit)
EndFunc
Func _FGUI_Exit_Combo_Exit()
MsgBox(1,"","test")
If StringLeft(_GUICtrlComboBoxEx_GetEditText($_FGUI_Exit_Combo_Exit),1) = "1" Then
ElseIf StringLeft(_GUICtrlComboBoxEx_GetEditText($_FGUI_Exit_Combo_Exit),1) = "3" Then
_exit()
EndIf
EndFunc
[/autoit]Danke im Voraus
mfg. Andi