I also corrected the structure of your example, as this is how I would do it personally. 0_-
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $hGUI = GUICreate('', 465, 135, Default, Default, BitOR($WS_THICKFRAME, $WS_POPUP))
GUISetState(@SW_SHOW, $hGUI)
GUIRegisterMsg($WM_NCHITTEST, 'WM_NCHITTEST')
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc ;==>Example
; If you want the GUI to be moved as well.
Func WM_NCHITTEST($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam, $lParam
Return $HTCAPTION
EndFunc ;==>WM_NCHITTEST