PDA

Click to See Complete Forum and Search --> : Bitblt


Technocrat
Feb 6th, 2001, 12:55 PM
I want to bitblt a bitmap to a static object on my window, which I got down and it looks fine, but the problem I have is how do I keep that image there even when the window is redrawn?

If I put the bitblt under the WM_PAINT switch my computer looses it mind, the CPU usage goes through the roof. The image will stay but there is an unexceptable CPU useage.


case WM_PAINT:
BitBlt(m_bhDC,0,0,293,73,hDC,0,0,SRCCOPY);


So my question is what is wrong with this? Is there some default message that I have to put in there for the rest of the window painting? Is WM_PAINT the only message I have to watch for to enure that my image is always there?

Thanks

Technocrat
Feb 6th, 2001, 02:34 PM
Ok I Got:

case WM_PAINT:
BeginPaint(m_hWnd_Main, &ps);
BitBlt(ps.hdc ,0,0,293,73,hDC,0,0,SRCCOPY); //m_bhDC
EndPaint(m_hWnd_Main, &ps);

To work but the refreshing is horrible, how can I make this work better?