DCs and disappearing pixels
Well, I assume this is a pretty simple question, atleast for someone a bit more experienced than me :)
I have a simple window, that allows you to draw in it using GDI functions, like an extremely simple stripped down version of MS Paint.
Now, i'm fairly inexperienced with GDI operations at this point, and the problem is that when I minimize the window, or cover it with another window, anything I have drawn disappears.
Now, I actually expected that, cause I have nothing so far to redraw the pixels once they have been invalidated.
My question is, how do I save the information so that it can be redrawn next time the window needs updating? I'm just using SetPixelV to plot the pixels when the left mouse button is down, and I assume I need to preserve my window DC info somehow, but I don't know enough about the GDI yet to accomplish that :)
Sorry for the long post, hope someone can clear this up for me.