VC++ OnPaint() problem
This may not be the best place for this type of discussion but still if anybody knows then help me!
I am just trying to make a basic Paint like application. The problem is that when i draw rectangle selecting the rect tool from the toolbar it draws perfectly, but as i minimised and then maximise or just resize it the content of the window disappears! as the WM_PAINT message is received.
I tried to use one approach i.e consider the whole client area as a bitmap but i need some standard approach to this approach. Please help me :(
Thanks in advance!
Make your drawing to a memory dc and in the paint function, bitblt it to the paint dc. I've done this by making the memory dc a member variable of the window class, so it is persistant. This is basically storing the client area to a bitmap, as you suggested.