Modify ↓
#1667 closed Bug (Fixed)
WinMove, Child-Window, Default.
Reported by: | mvg | Owned by: | Jon |
---|---|---|---|
Milestone: | 3.3.9.13 | Component: | AutoIt |
Version: | 3.3.6.1 | Severity: | None |
Keywords: | winmove child default | Cc: |
Description
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
Attachments (0)
Change History (5)
comment:1 Changed 15 years ago by Jpm
- Milestone set to 3.3.7.0
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
comment:2 Changed 14 years ago by Jpm
- Resolution Fixed deleted
- Status changed from closed to reopened
comment:4 Changed 11 years ago by Jon
- Resolution set to Rejected
- Status changed from reopened to closed
comment:5 Changed 11 years ago by Jon
- Milestone set to 3.3.9.13
- Owner changed from Jpm to Jon
- Resolution changed from Rejected to Fixed
Fixed by revision [8179] in version: 3.3.9.13
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
Fixed by revision [5890] in version: 3.3.7.0