AdmiralAlkex Posted May 8, 2007 Share Posted May 8, 2007 I am making a script that uses Holgers "SetWindowLong and SetParent method" to run a application in my gui and i really need the application to just be there like frozen but still "on" and accepting commands. So is it like possible to turn off the ability to minimise/maximise/shutdown/resise and move windows?? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
herewasplato Posted May 8, 2007 Share Posted May 8, 2007 I am making a script that uses Holgers "SetWindowLong and SetParent method" to run a application in my gui and i really need the application to just be there like frozen but still "on" and accepting commands.So is it like possible to turn off the ability to minimise/maximise/shutdown/resise and move windows??Work thru this thread:http://www.autoitscript.com/forum/index.ph...st&p=206064I've not used the code, so I don't know what problems still remain. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 8, 2007 Author Share Posted May 8, 2007 Work thru this thread:http://www.autoitscript.com/forum/index.ph...st&p=206064I've not used the code, so I don't know what problems still remain.thx for this, it looks really interesting maybe even the solution to my problem!! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 8, 2007 Author Share Posted May 8, 2007 I tried incorporating the code from the link you gave me into my code and nothing happens..... also i dont know how to build in the "SWP_NOMOVE / SWP_NOSIZE"...... Can someone plz help me?? expandcollapse popup#include <GUIConstants.au3> $hGUI = GUICreate("DosCommandsMenu by Alexander Samuelsson", 1014, 732, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN)) WinMove("DosCommandsMenu by Alexander Samuelsson", "", "0", "0") $PID = Run("cmd.exe", "", @SW_HIDE) $hWnd = 0 $stPID = DllStructCreate("int") Do $WinList = WinList() For $i = 1 To $WinList[0][0] If $WinList[$i][0] <> "" Then DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WinList[$i][1], "ptr", DllStructGetPtr($stPID)) If DllStructGetData($stPID, 1) = $PID Then $hWnd = $WinList[$i][1] ExitLoop EndIf EndIf Next Sleep(100) Until $hWnd <> 0 $stPID = 0 If $hWnd <> 0 Then $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20) $nExStyle = $nExStyle[0] DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOr($nExStyle, $WS_EX_MDICHILD)) DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) WinSetState($hWnd, "", @SW_SHOW) WinMove($hWnd, "", 0, 0, 669, 400) EndIf GUISetState() AutoItSetOption("WinTitleMatchMode", 2) $calcHwnd = WinGetHandle("cmd.exe") AutoItSetOption("WinTitleMatchMode", 1) Global Const $SC_CLOSE = 0xF060 Global Const $SC_MINIMIZE = 0xF020 Global Const $SC_MAXIMIZE = 0xF030; Global Const $SC_RESTORE = 0xF120 $menu = DllCall("user32.dll","hwnd","GetSystemMenu","hwnd", $calcHwnd, "int",0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_MINIMIZE, "int", 0x0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_MAXIMIZE, "int", 0x0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_CLOSE, "int", 0x0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_RESTORE, "int", 0x0) While 1 $msg = GUIGetMsg() If $msg = -3 Then ExitLoop WEnd .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now