Not sure about this, (child of child of child ... headache?)
but when using WinMove() on a child Gui-window while using the Default keyword the result is kinda unexpected.
The argument here is that with the use of the Default keyword it is implied that no changes are made to that aspect of the element.
With Child-windows this is unfornately not the case.
#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <Debug.au3>
Enum $_logwin_ = 1, $_console_, $_msgbox_, $_file_
_DebugSetup(Default, False, $_console_, 'DebugOut.log')
;~ _DebugOut('msg')
;~ _DebugReportVar('msg', 'var/data')
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StructureConstants.au3>
#include <StaticConstants.au3>
_Main()
Func _Main()
Local $hGUI, $h_cGUI
Local $res
$hGUI = GUICreate("Main Gui", 200, 200, 10, 10, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX))
GUISetBkColor(0x88AABB)
$res = WinGetPos($hGUI) ;; returns absolute (destop relative) coordinates.
_DebugReportVar('[1] WinGetPos($hGUI)', $res) ;### Debug DebugOut.
$h_cGUI = GUICreate("Child GUI", 100, 100, 10, 10, $WS_CHILD, -1, $hGUI)
GUISetBkColor(0X006400)
$res = WinGetPos($h_cGUI) ;; returns absolute (destop relative) coordinates.
_DebugReportVar('[1] WinGetPos($h_cGUI)', $res) ;### Debug DebugOut.
GUISetState(@SW_SHOW, $h_cGUI)
GUISwitch($hGUI)
GUICtrlCreateLabel('', 10, 10, 100, 100, $SS_WHITEFRAME)
GUISetState(@SW_SHOW, $hGUI)
Sleep(1000 * 0.5)
$res = WinMove($h_cGUI, '', Default, Default) ;; moves to relative position inside parrent GUI, using absolute child-window coordinates.
_DebugReportVar('[2] WinMove()', $res) ;### Debug DebugOut.
$res = WinGetPos($h_cGUI)
_DebugReportVar('[3] WinGetPos()', $res) ;### Debug DebugOut.
Do ;; gui wait.
Until GUIGetMsg() = $GUI_EVENT_CLOSE ;; Or Not WinActive($hGUI)
EndFunc
Fixed by revision [5890] in version: 3.3.7.0