Jump to content

GUI resize


Recommended Posts

#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

Link to comment
Share on other sites

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...