qwert 43 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. Share this post Link to post Share on other sites
wakillon 403 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 Share this post Link to post Share on other sites
qwert 43 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? Share this post Link to post Share on other sites
wakillon 403 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 Share this post Link to post Share on other sites
qwert 43 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. Share this post Link to post Share on other sites
wakillon 403 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 Share this post Link to post Share on other sites
Zedna 280 Posted August 3, 2011 Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites