qwert Posted August 3, 2011 Share Posted August 3, 2011 I'm specifying $WS_SIZEBOX to allow resizing of my main GUI window ... which works. But I only want to allow resizing of the window height. How can I inhibit any change to the width? Thanks for any help. Link to comment Share on other sites More sharing options...
wakillon Posted August 3, 2011 Share Posted August 3, 2011 Look at GUICtrlSetResizing and $GUI_DOCKWIDTH AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
qwert Posted August 3, 2011 Author Share Posted August 3, 2011 I had tried $GUI_DOCKWIDTH as the default at the top of my script. It only affected controls within the window — not the whole window. I've since placed it immediately after the GUICreate and specifically for the ContolID of the window ... but that didn't work, either. Is there a different way to use it? Link to comment Share on other sites More sharing options...
wakillon Posted August 3, 2011 Share Posted August 3, 2011 (edited) Try this #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $hGUI = GUICreate ( "Lock Width", 500, 200, -1, -1, $WS_SIZEBOX ) GUISetState ( ) GUIRegisterMsg ( $WM_GETMINMAXINFO, "_WM_GETMINMAXINFO" ) While 1 If GUIGetMsg ( ) = -3 Then Exit WEnd Func _WM_GETMINMAXINFO ( $hwnd, $Msg, $wParam, $lParam ) $tagMaxinfo = DllStructCreate ( "int;int;int;int;int;int;int;int;int;int", $lParam ) DllStructSetData ( $tagMaxinfo, 7, 500 ) ; width Min 500 DllStructSetData ( $tagMaxinfo, 9, 500 ) ; width Max 500 Return $GUI_RUNDEFMSG EndFunc ;==> _WM_GETMINMAXINFO ( ) Edited August 3, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
qwert Posted August 3, 2011 Author Share Posted August 3, 2011 Indeed, that does work. Rather than disallow resizing (and not show <-> cursor change), it restricts width to a range ... which is set "500 to 500".Interesting. I certainly would have never thought of such an approach. But unless someone knows how to "disallow", I'll go with it.Thanks very much. Link to comment Share on other sites More sharing options...
wakillon Posted August 3, 2011 Share Posted August 3, 2011 I do not know any other way... Glad to help you ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Zedna Posted August 3, 2011 Share Posted August 3, 2011 Resources UDF ResourcesEx UDF AutoIt Forum Search 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