mfc >> Erase a line in CBitMap
by AliR » Tue, 21 Mar 2006 23:57:17 GMT
If you want to allow users to deleted some drawings after they have been
drawn, you will need to keep your drawings as objects instead of directly
drawing to the DC as the user draws.
For example. You will need to have a class for everything that you allow the
user to draw (Rectangles, Circles, lines,....)
As the user draws, you need to create one of these classes and store it in
an container class (array works well, if you care about zorder). When you
need to redraw the graphics, loop through the container, and tell each one
to draw itself. When you want to delete an item (like a line) simply remove
it from the list, and redraw the screen.
AliR.