Sundance Posted July 14, 2008 Share Posted July 14, 2008 Hiho, does anyone of you know if i can create a gui which is only resizeable in height and not in width? Haven't found any clear solution. greetz Sundance Link to comment Share on other sites More sharing options...
Zedna Posted July 14, 2008 Share Posted July 14, 2008 #include <GUIConstants.au3> Global $size, $width $gui = GUICreate("Test GUI",500,500,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX)) $size = WinGetPos($gui) $width = $size[2] ; width of window (GUICreate is ClientSize) GUISetState (@SW_SHOW) GUIRegisterMsg($WM_GETMINMAXINFO, "MY_WM_GETMINMAXINFO") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Func MY_WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam) $minmaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int",$lParam) DllStructSetData($minmaxinfo,7,$width) ; min X DllStructSetData($minmaxinfo,8,250) ; min Y DllStructSetData($minmaxinfo,9,$width) ; max X DllStructSetData($minmaxinfo,10,700) ; max Y Return 0 EndFunc #cs typedef struct { POINT ptReserved; POINT ptMaxSize; POINT ptMaxPosition; POINT ptMinTrackSize; POINT ptMaxTrackSize; } MINMAXINFO; #ce Professor_Bernd 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Sundance Posted July 14, 2008 Author Share Posted July 14, 2008 Perfect Zedna! After inserting the GuiConstantsEx.au3 it works. Many thanks !!!! greetz Sundance Link to comment Share on other sites More sharing options...
v3rt1g0 Posted August 6, 2008 Share Posted August 6, 2008 Thank you Zedna 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