Adding to that a bit, the code below hides the contents of the window while it's being resized. (Hope I understood what was wanted.)
#include <GUIConstants.au3>
Global Const $WM_ENTERSIZEMOVE = 0x231,$WM_EXITSIZEMOVE = 0x232
Global $child = 0
Opt("GUICoordMode", 2)
Opt("GUIResizeMode", 1)
Opt("GUIOnEventMode", 1)
$parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX)
GUIRegisterMsg ($WM_ENTERSIZEMOVE, "_Resize")
GUIRegisterMsg ($WM_EXITSIZEMOVE, "_Downsize")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlCreateButton("a button",50,100,100,21)
GUIRegisterMsg($WM_PAINT,"_Newsize")
GUISetState(@SW_SHOW)
While 1
Sleep(10)
WEnd
Func _Resize()
$wp = WinGetPos($parent)
$cp = WinGetClientSize($parent)
$border = ($wp[2] - $cp[0])/2
$TitleHt = $wp[3] - $cp[1] - $border
If $child = 0 Then
$child = GUICreate("",$cp[0],$cp[1],$wp[0] + $border,$wp[1] + $TitleHt,$WS_POPUP,$WS_EX_TOPMOST)
GUISetState(@SW_SHOW,$child)
ToolTip("Resizing Started", 0, 0)
Else
WinMove($child,'',$wp[0] + $border,$wp[1] + $TitleHt,$cp[0],$cp[1])
EndIf
EndFunc ;==>_Resize
Func _Downsize()
ToolTip("")
GUIDelete($child)
$child = 0
EndFunc
Func _Newsize()
If $child = 0 Then Return $GUI_RUNDEFMSG
$wp = WinGetPos($parent)
$cp = WinGetClientSize($parent)
$border = ($wp[2] - $cp[0])/2
$TitleHt = $wp[3] - $cp[1] - $border
WinMove($child,'',$wp[0] + $border,$wp[1] + $TitleHt,$cp[0],$cp[1])
EndFunc
Func _Exit()
Exit
EndFunc ;==>_Exit