Hello everyone.
I've recently written a program which draws some stuff to a DC; however, on a screen invalidation, the things drawn on the DC, dissapear (get erased.) Does anyone know how one would be able to draw to this dc, and have whatever was drawn to the dc remain there AFTER the screen has been invalidated?
If I move my program off screen (which invalidates the screen) everything I drew to the screen, gets erased!
For example, lets say I created a DC as follows:
WM_CREATE:
HDC screenDC;
screenDC = GetDC(hWnd);
break;
WM_MOUSEMOVE:
//Draw to the created DC
SetPixel(hDC, LOWORD(lParam), HIWORD(lParam), (0, 0, 0, 0));
break;
Once I have drawn to my created DC, via the SetPixel function in the above example, if the screen becomes invalidated, anything drawn on the DC gets erased.
How can I draw to a DC, and have its contents remain on it, once the screne is invalidated? Thank you.