sandin Posted June 25, 2008 Posted June 25, 2008 Hi all. I'm using $WS_SIZEBOX style with my GUI, so I can stretch it in both directions, but is there a way to set min and max stretching value? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Xandl Posted June 25, 2008 Posted June 25, 2008 Hello, I once found this here in the forum: Global $aUtil_MinMax[4] Func initMinMax($x0,$y0,$x1,$y1) Local Const $WM_GETMINMAXINFO = 0x24 $aUtil_MinMax[0]=$x0 $aUtil_MinMax[1]=$y0 $aUtil_MinMax[2]=$x1 $aUtil_MinMax[3]=$y1 GUIRegisterMsg($WM_GETMINMAXINFO,'MY_WM_GETMINMAXINFO') EndFunc Func MY_WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam) Local $minmaxinfo = DllStructCreate('int;int;int;int;int;int;int;int;int;int',$lParam) DllStructSetData($minmaxinfo,7,$aUtil_MinMax[0]); min X DllStructSetData($minmaxinfo,8,$aUtil_MinMax[1]); min Y DllStructSetData($minmaxinfo,9,$aUtil_MinMax[2]); max X DllStructSetData($minmaxinfo,10,$aUtil_MinMax[3]); max Y Return 0 EndFunc ciao Xandl
sandin Posted June 25, 2008 Author Posted June 25, 2008 thank you for a fast reply , but how do I implement this into my script? can you give an example how to use this func.? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Xandl Posted June 25, 2008 Posted June 25, 2008 The array has to be global Use initMinMax() to set the bounds. GUIRegisterMsg() does the rest #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $aUtil_MinMax[4] GUICreate('WM_GETMINMAXINFO',400,400,-1,-1,$WS_SIZEBOX) GUISetState() initMinMax(100,100,600,600) Do Sleep(20) Until GUIGetMsg() = -3 Func initMinMax($x0,$y0,$x1,$y1) Local Const $WM_GETMINMAXINFO = 0x24 $aUtil_MinMax[0]=$x0 $aUtil_MinMax[1]=$y0 $aUtil_MinMax[2]=$x1 $aUtil_MinMax[3]=$y1 GUIRegisterMsg($WM_GETMINMAXINFO,'MY_WM_GETMINMAXINFO') EndFunc Func MY_WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam) Local $minmaxinfo = DllStructCreate('int;int;int;int;int;int;int;int;int;int',$lParam) DllStructSetData($minmaxinfo,7,$aUtil_MinMax[0]); min X DllStructSetData($minmaxinfo,8,$aUtil_MinMax[1]); min Y DllStructSetData($minmaxinfo,9,$aUtil_MinMax[2]); max X DllStructSetData($minmaxinfo,10,$aUtil_MinMax[3]); max Y Return $GUI_RUNDEFMSG EndFunc ciao Xandl
sandin Posted June 25, 2008 Author Posted June 25, 2008 thank you, that's great! Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
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