Hi,
Very wild guess is you keep invalidating the area where the line is and inside your WM_PAINT handler draw it again at another position. Alternatively you may switch your draw mode, so that when you draw the same line, it is actually erased, and then switch back to normal mode and draw it again at another position.
Once again, just a guess, correct me if I am wrong!
Cheers,
Lini
What do you want the line to do? What is the purpose of the line? You could manually redraw the line at a different location in the OnPaint function. You could also create a new window without a border and form it to the size of the line you want. This would allow you to move the "line" as you would a window. This would also give you the option to allow the user to move around the line.
You can see professional win32 ng (news://comp.os.ms-windows.programmer.win32)
for a sample code doing _exactly_ that (MS)
(and more, as it's a drawing program to draw any shapes...)
Comment