tags:

views:

9

answers:

0

I usually put my drawing in WM_PAINT to draw on screen but if you need to figure out this at runtime would you still use GDI drawing APIs?

Example-

//In WndProc

case WM_PAINT:
{
   hdc = GetWindowDC (hwnd) ;
   //draw here using hdc
   ReleaseDC (hwnd, hdc) ;

}

Instead of putting the drawing in WM_PAINT, can you draw using function and still get the functionality of WM_PAINT to redraw?