How to use OnPaint() ??? :(
-
Hi Expert(s), I need to draw 100 line with e.Graphics.DrawLine() command. Problem is that, that when i minimize my window all 100 line are vanish. I learn some topic on device context but not got idea how to do.Wht i wanna to do is that i am drawing line from many differenct event says with 10-20 mouse down events of picture box.So here how do i write code in my OnPaoint() .Pls Pls giv me solution. Help wud b really appreciated.
Regards Chintan www.visharadsoft.com (Nothing is so purify as KNOWLEDGE)
-
Hi Expert(s), I need to draw 100 line with e.Graphics.DrawLine() command. Problem is that, that when i minimize my window all 100 line are vanish. I learn some topic on device context but not got idea how to do.Wht i wanna to do is that i am drawing line from many differenct event says with 10-20 mouse down events of picture box.So here how do i write code in my OnPaoint() .Pls Pls giv me solution. Help wud b really appreciated.
Regards Chintan www.visharadsoft.com (Nothing is so purify as KNOWLEDGE)
You need to store any information you need to redraw all the lines when you receive the WM_PAINT notification. For a DC to do the drawing to, you can use the BeginPaint/EndPaint APIs or get a DC for the window and handle the validating of the update region of the window yourself. What language are you coding in? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder