CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 26

Thread: Repaint failure

Threaded View

  1. #1
    Join Date
    Apr 2010
    Location
    Western WA, USA
    Posts
    59

    Repaint failure

    I'm using VC++ 6 on Win2k, and I am testing on XP and Vista for compatibility problems. My app has a graphic window which is not repainting properly when my app has lost focus and other windows are dragged across it. When my app is topmost, there is no problem. When a child dialog dragged across, there is no problem.

    Since the repaint does occur (albiet corrupted), I know WM_PAINT is being handled. What is baffling to me is that the problem only happens in XP and Vista, not Win2K.

    I am drawing to a buffer in memory and blitting to the screen:
    Code:
    case WM_PAINT:
    	dc = BeginPaint(hWsbox, &ps);
    	SelectObject(dc, hBitmap);
    	BitBlt(dc, 0, 0, selarr_wid, selarr_hgt,
    		sdc, 0, scroll ? si.nPos * (SEL_RY + fhgt) : 0, SRCCOPY);
    	EndPaint(hWsbox, &ps);
    	break;
    Can someone give me a clue?
    Attached Images Attached Images

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

Featured