Click here to Skip to main content
15,888,100 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I am working on a mouse gesture recogniser and I am pressing right click and drawing with pencil tool all over my desktop. When I release it the drawing is still there and I need to use InvalidateRect() function to remove it. But it flickers like when you press Refresh.

Is there a way to draw that line somewhere but actually not over the screen so I can delete it without having the flicker effect?
Thank you, Daniel!
Posted
Updated 18-May-10 6:35am
v3

 
Share this answer
 
Comments
xspitfirexx 19-May-10 10:15am    
yes but this examples show how to draw without flicks, i draw it without flicks but i dont know how to save a context somewhere and then restore it without using InvalidateRect cause that function makes the refresh flicks.
I saw some examples about how to draw with double buffering but i can draw normally without flicking, my problem is that i need to create a backup of the context somehow and after i draw something, to restore the old one (without using InvalidateRect which makes the screen flick. My program on right click down starts to draw on the screen over all windows and on mouse up it has to delete all what i drawed without using InvalidateRect (cause that function makes my screen flick).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900