Erstellt ein AVI-Control
#include <GuiAVI.au3>
_GUICtrlAVI_Create ( $hWnd [, $sFilePath = "" [, $iSubFileID = -1 [, $iX = 0 [, $iY = 0 [, $iWidth = 0 [, $iHeight = 0 [, $iStyle = 0x00000006 [, $iExStyle = 0x00000000]]]]]]]] )
| $hWnd | Handle zum Parent- oder Eigner-Fenster |
| $sFilePath | [optional] Der Dateiname vom Video. Es werden nur .avi Dateien unterstützt. |
| $iSubFileID | [optional] ID der zu verwendenden Unterdatei. |
| $iX | [optional] Horizontale Position des Controls |
| $iY | [optional] Vertikale Position des Controls |
| $iWidth | [optional] Breite des Controls |
| $iHeight | [optional] Höhe des Controls |
| $iStyle | [optional] Stile des Controls: $ACS_CENTER - Zentriert das Video im Control-Fenster $ACS_TRANSPARENT - Erlaubt es, die Hintergrundfarbe des Anzeigefensters an die Farbe des darunterliegenden Fensters anzupassen, so dass der Hintergrund "transparent" wird $ACS_AUTOPLAY - Beginnt mit dem Abspielen des Videos sobald der AVI-Clip geöffnet wird $ACS_TIMER - Das Control spielt den Clips ohne das Erstellen eines Themas Standard: $ACS_TRANSPARENT, $ACS_AUTOPLAY Erzwungen: $WS_CHILD, $WS_VISIBLE |
| $iExStyle | [optional] erweiterte Stile des Controls. Diese entsprechen den Standard $WS_EX_* Konstanten. Siehe Tabelle der erweiterten Stile. |
| Erfolg: | das Handle des Animations-Controls |
| Fehler: | 0 |
Diese Funktion ist für erfahrene Benutzer und zum erlernen der Funktion von Controls.
- - - - - - - - Erklärung der Controls - - - - - - - -
#include "Extras\WM_NOTIFY.au3" #include <GuiAVI.au3> #include <GUIConstantsEx.au3> #include <WindowsNotifsConstants.au3> Global $g_hAVI Example() Func Example() Local $sWow64 = "" If @AutoItX64 Then $sWow64 = "\Wow6432Node" Local $hGui, $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\Examples\GUI\SampleAVI.avi" ; Erstellt eine GUI $hGui = GUICreate("AVI Erstellen (v" & @AutoItVersion & ")", 300, 100) $g_hAVI = _GUICtrlAVI_Create($hGui, $sFile, -1, 10, 10) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Spielt das AutoIt Beispiel-AVI ab _GUICtrlAVI_Play($g_hAVI) ; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Schließt AVI-Clip und GUI _GUICtrlAVI_Close($g_hAVI) GUIDelete() EndFunc ;==>Example Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom = $lParam Local $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word Local $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $g_hAVI Switch $iCode Case $ACN_START ; Benachrichtigt das Parent-Fenster eines AnimationsControls, dass der verknüpfte AVI-Clip gestartet wurde _WM_NOTIFY_DebugInfo("$ACN_START", "hWndFrom,IDFrom", $hWndFrom, $iIDFrom) ; Kein Rückgabewert Case $ACN_STOP ; Benachrichtigt das Parent Fenster eines AnimationsControls, dass der verknüpfte AVI-Clip gestoppt wurde _WM_NOTIFY_DebugInfo("$ACN_STOP", "hWndFrom,IDFrom", $hWndFrom, $iIDFrom) ; Kein Rückgabewert EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND
#include "Extras\WM_NOTIFY.au3" #include <GuiAVI.au3> #include <GUIConstantsEx.au3> #include <WindowsNotifsConstants.au3> Global $g_hAVI _Beispiel2() Func _Beispiel2() Local $hGui ; Erstellt eine GUI $hGui = GUICreate("AVI Erstellen (v" & @AutoItVersion & ")", 300, 100) $g_hAVI = _GUICtrlAVI_Create($hGui, @SystemDir & "\Shell32.dll", 150, 10, 10) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Spielt das AutoIt Beispiel-AVI ab _GUICtrlAVI_Play($g_hAVI) ; Die Schleife wiederholt sich, bis der Benutzer eine Beenden-Aktion auslöst Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Schließt AVI-Clip und GUI _GUICtrlAVI_Close($g_hAVI) GUIDelete() EndFunc ;==>_Beispiel2 Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom = $lParam Local $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word Local $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $g_hAVI Switch $iCode Case $ACN_START ; Benachrichtigt das Parent-Fenster eines AnimationsControls, dass der verknüpfte AVI-Clip gestartet wurde _WM_NOTIFY_DebugInfo("$ACN_START", "hWndFrom,IDFrom", $hWndFrom, $iIDFrom) ; Kein Rückgabewert Case $ACN_STOP ; Benachrichtigt das Parent Fenster eines AnimationsControls, dass der verknüpfte AVI-Clip gestoppt wurde _WM_NOTIFY_DebugInfo("$ACN_STOP", "hWndFrom,IDFrom", $hWndFrom, $iIDFrom) ; Kein Rückgabewert EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND