Results 1 to 2 of 2

Thread: Bitblt

  1. #1

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    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.

    Code:
    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
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  2. #2

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    Ok I Got:
    Code:
    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?
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width