#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
Local $y = 0
Local $hGUI = GUICreate("Приложение на autoit",500,500)
Local $clicked= GUICtrlCreateButton("Закрасить часть окна", 50, 200,400,50)
GUISetState(@SW_SHOW, $hGUI)
While 1
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE then
ExitLoop
endif
if $msg = $clicked then
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFEE88BB)
_GDIPlus_GraphicsFillRect($hGraphic, 10, $y, 500, 50, $hBrush)
$y = $y + 50
endif
WEnd
|