#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <BorderConstants.au3>

; Создаёт GUI
$hGUI = GUICreate("Рисование границ", 400, 300)
GUISetState()

$hDC = _WinAPI_GetWindowDC($hGUI)

$tRect = DllStructCreate($tagRECT)
DllStructSetData($tRect, "Left", 20)
DllStructSetData($tRect, "Top", 50)
DllStructSetData($tRect, "Right", 200)
DllStructSetData($tRect, "Bottom", 200)
$ptrRect = DllStructGetPtr($tRect)

; Рисует границы прямоугольника
_WinAPI_DrawEdge($hDC, $ptrRect, $EDGE_SUNKEN, $BF_RECT)

_WinAPI_ReleaseDC($hGUI, $hDC) ; Освобождает ресурсы

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE