zwierzak Posted November 20, 2010 Share Posted November 20, 2010 (edited) Hello, I'd like to ask u guys a question. When I once draw a line(with _WinAPI_DrawLine ), how to redraw it? I mean to remove the present one and make second one in the other place? Edited November 20, 2010 by zwierzak Link to comment Share on other sites More sharing options...
JohnOne Posted November 20, 2010 Share Posted November 20, 2010 From the helpfile_WinAPI_RedrawWindowIts what I used once anyway AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
zwierzak Posted November 20, 2010 Author Share Posted November 20, 2010 I don't really get how to do it. Any example code pls? Link to comment Share on other sites More sharing options...
JohnOne Posted November 20, 2010 Share Posted November 20, 2010 There is examples'o'plenty in the helpfile, even under the heading of the very function you want to use. I couldnt do it any better than that. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
zwierzak Posted November 20, 2010 Author Share Posted November 20, 2010 (edited) I came to a conclusion, that using GDI library would be better idea, because i want to draw pictures in application, not on the screen. What then should i do with the GDI drawed line? I mean how to delete it I have this example: #include <GuiConstantsEx.au3> #include <GDIPlus.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hGUI, $hGraphic, $hPen ; Create GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState() ; Draw line _GDIPlus_Startup () $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI) $hPen = _GDIPlus_PenCreate () _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 150, 390, 150, $hPen) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_PenDispose ($hPen) _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_Shutdown () EndFunc ;==>_Main Ok it works. But how to delete this line after hmm 5 seconds? sleep(5000)...and? I really don't get this and i cannot find any appropiate function in my HelpFile. Neither do this, which u mensioned. Sorry if I'm too troublesome for u ;/ Edited November 20, 2010 by zwierzak Link to comment Share on other sites More sharing options...
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