Jump to content

When resizing with $WS_SIZEBOX...


sensalim
 Share

Recommended Posts

I have this

"

$Form1 = GUICreate("Search CustN", 300, 220, 193, 125, $WS_SIZEBOX)

"

In it, there are:

3 labels

1 input box

1 button

and

1 edit box

When resizing, the input box and edit box resize fine but the button (and labels) do not...

I don't care much about the label but I want the button to resize too.

Is there a way?

Thanks.

-----------

ALSO

How do I make it so that it's only horizontally-resizeable, not vertically?

Thanks.

Edited by sensalim
Link to comment
Share on other sites

ALSO

How do I make it so that it's only horizontally-resizeable, not vertically?

Thanks.

#include <GUIConstants.au3>
;~ Const $WM_GETMINMAXINFO = 0x24

$gui = GUICreate("Test GUI",300,200,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX))
$size = WinGetPos($gui)
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,200) ; min X
    DllStructSetData($minmaxinfo,8,$size[3]) ; min Y
;~  DllStructSetData($minmaxinfo,9,500) ; max X
    DllStructSetData($minmaxinfo,10,$size[3]) ; 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

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...