#include <WindowsConstants.au3> Opt("TrayIconDebug",1) $hGui = GUICreate("Test GUI", 380, 380) GUISetState(@SW_HIDE, $hGui) $hPid=Run(@SystemDir & '\sndrec32.exe /play "' & @WindowsDir & '\Media\tada.wav"',"", @SW_HIDE) WinWait("[CLASS:SoundRec]", "", 5) $hChild = WinGetHandle("[CLASS:SoundRec]", "") $NEXSTYLE = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hChild, "int", 236) DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hChild, "int", 236, "int", BitOR($NEXSTYLE[0], $WS_EX_MDICHILD)) DllCall("user32.dll", "int", "SetParent", "hwnd", $hChild, "hwnd", $hGui) WinMove($hChild, "", -6, -40 ,400,450) ControlHide($hChild,"","shadowframe1") ControlHide($hChild,"","noflickertext1") ControlHide($hChild,"","noflickertext2") ControlHide($hChild,"","shadowframe2") ControlHide($hChild,"","noflickertext3") ControlHide($hChild,"","noflickertext4") ControlHide($hChild,"","msctls_trackbar321") ControlMove($hChild,"","wavedisplay1",150,150) ControlMove($hChild,"","Button1",10,10,50,50) ControlMove($hChild,"","Button2",70,10,50,50) ControlMove($hChild,"","Button3",130,10,50,50) ControlMove($hChild,"","Button4",190,10,50,50) ControlMove($hChild,"","Button5",250,10,50,50) GUISetState(@SW_SHOW, $hGui) WinSetState($hChild,"",@SW_SHOW) While GUIGetMsg()<>-3 Sleep(1) WEnd Func OnAutoItExit() ProcessClose($hPid) EndFunc |