How can draw a line in mouse move ?
-
I want to draw a line inside my view window.When i will left click in the view window the line should expand according to my mouse move and when i will right click the line should be drawn from the left click point to the right click point(before that no line should be drawn) how can i do that ? manoj Kumar Dalei, IIT Delhi
-
I want to draw a line inside my view window.When i will left click in the view window the line should expand according to my mouse move and when i will right click the line should be drawn from the left click point to the right click point(before that no line should be drawn) how can i do that ? manoj Kumar Dalei, IIT Delhi
Handle the WM_LBUTTONDOWN and WM_RBUTTONDOWN messages, saving the points at which these occur, then in your WM_PAINT handler (or OnDraw if MFC) just use GDI calls (or CDC members) to do the line drawing. Check out the SCRIBBLE tutorial if you're using MFC. Steve S [This signature space available for rent]