Maybe this ... ?
#include <WindowsConstants.au3>
Global Const $WMSZ_LEFT = 1
Global Const $WMSZ_RIGHT = 2
Global Const $WMSZ_TOP = 3
Global Const $WMSZ_TOPLEFT = 4
Global Const $WMSZ_TOPRIGHT = 5
Global Const $WMSZ_BOTTOM = 6
Global Const $WMSZ_BOTTOMLEFT = 7
Global Const $WMSZ_BOTTOMRIGHT = 8
Global $width = 400, $iStep = 50
$Form1 = GUICreate("test", $width, 237, -1, -1, $WS_SIZEBOX)
GUISetState()
GUIRegisterMsg(0x0214, "WM_SIZING")
While GUIGetMsg() <> -3
WEnd
Func WM_SIZING($hWnd, $iMsg, $wparam, $lparam)
$pos = WinGetPos($Form1)
Local $sRect = DllStructCreate("Int[4]", $lparam)
Local $left = DllStructGetData($sRect, 1, 1)
Local $top = DllStructGetData($sRect, 1, 2)
Local $Right = DllStructGetData($sRect, 1, 3)
Local $bottom = DllStructGetData($sRect, 1, 4)
Switch $wparam
Case $WMSZ_LEFT, $WMSZ_TOP, $WMSZ_TOPLEFT, $WMSZ_BOTTOMLEFT
DllStructSetData($sRect, 1, $pos[0], 1)
DllStructSetData($sRect, 1, $pos[1], 2)
Case $WMSZ_RIGHT
If $pos[2] < $width+50 Then
DllStructSetData($sRect, 1, $right+50, 3)
$width += 50
EndIf
EndSwitch
Return 'GUI_RUNDEFMSG'
EndFunc