Здравствуйте!
Вот GUI:
Как я могу получить координаты кнопок "ОК" и "Отмена" относительно созданного окна.
Вот GUI:
Код:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
;~ Opt("GUIResizeMode",$GUI_DOCKHCENTER+6)
;~ Opt("GUIResizeMode", 2 + 32 + 256 + 512)
Example()
Func Example()
$gui = GUICreate("GUI", 500, 550, -1, -1, $WS_OVERLAPPEDWINDOW)
$Button_1 = GUICtrlCreateButton("ОК ", 10, 380, 100)
$Button_2 = GUICtrlCreateButton("Отмена", 380, 380, 100)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $GUI_EVENT_RESIZED
$_pos = WinGetPos($gui)
If $_pos[2] < 245 Then
WinMove($gui, "", $_pos[0], $_pos[1], 245, $_pos[3])
ElseIf $_pos[3] < 98 Then
WinMove($gui, "", $_pos[0], $_pos[1], $_pos[2], 98)
EndIf
;~ _ArrayDisplay($_pos)
EndSelect
WEnd
EndFunc ;==>Example
Как я могу получить координаты кнопок "ОК" и "Отмена" относительно созданного окна.