Andreik Posted August 20, 2008 Posted August 20, 2008 Can somebody to write a simple example that include this function? Thanks!
smashly Posted August 20, 2008 Posted August 20, 2008 Hi, expandcollapse popup#include <GUIConstantsEx.au3> #Include <GDIPlus.au3> #Include <WinAPI.au3> Global Const $ApD = 360, $rD = 40 Global $rX = 0, $rY = 0 $hGui = GUICreate(":-)", $ApD, $ApD) GUISetState(@SW_SHOW, $hGui) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui) _GDIPlus_GraphicsClear($hGraphic, 0xFF0000FF) AdlibEnable("_Invalidate", 200) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() Exit Case Else EndSwitch WEnd Func _Invalidate() Local $tRect = DllStructCreate($tagRECT) DllStructSetData($tRect, "Left", $rX) DllStructSetData($tRect, "Top", $rY) DllStructSetData($tRect, "Right", $rX + $rD) DllStructSetData($tRect, "Bottom", $rY + $rD) _WinAPI_InvalidateRect($hGui, $tRect, True) $rX += $rD*2 If $rX >= $ApD And $rY < $ApD Then $rX = 0 $rY += $rD*2 ElseIf $rX >= $ApD And $rY >= $ApD Then _GDIPlus_GraphicsClear($hGraphic, 0xFF0000FF) $rX = 0 $rY = 0 EndIf EndFunc Cheers
Moderators SmOke_N Posted August 20, 2008 Moderators Posted August 20, 2008 Can somebody to write a simple example that include this function?Thanks!http://www.autoitscript.com/forum/index.ph..._InvalidateRect Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Andreik Posted August 20, 2008 Author Posted August 20, 2008 Thanks smashly, SmOke_N! Now I know how I can use it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now