#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$hGui = GUICreate('Test', 200, 200, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU))
$nLabel = GUICtrlCreateLabel('Test', 10, 10, 180, 20)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$nButton = GUICtrlCreateButton('Click', 50, 50, 100, 30)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $nButton
$aPos = ControlGetPos($hGui, '', $nLabel)
$sMessage = StringFormat('X:\t%d\nY:\t%d\nW:\t%d\nH:\t%d\n', $aPos[0], $aPos[1], $aPos[2], $aPos[3])
MsgBox(64, 'nLabel', $sMessage)
EndSwitch
WEnd