Click to See Complete Forum and Search --> : WM_PAINT question?


raedbenz
February 24th, 2009, 06:17 PM
Hi,,,
inside the "case WM_PAINT:" all what i am doing is calling to functions. one draws uses polyline function and the other loads a bitmap from .bmp file. each one by itself works fine . when i call them both like shown below only the first works.

case WM_PAINT:
{

testBMP(hwnd);
Paint_Polyline(hwnd);
}
break;

hints???? thanks

_Superman_
February 25th, 2009, 12:21 AM
Try using BeginPaint to get the DC and then pass the DC to all the functions.
At the end call EndPaint.

JohnCz
March 7th, 2009, 12:01 AM
It is not a matter of trying you have to do it in order to have canvas (device context) to pain on.