Home > Software engineering >  How to refresh the client area?
How to refresh the client area?

Time:09-23

I made a picture viewer program, open a picture, and then open another image, the image in front of the shadow is still in the client area, only heavy brush window size will refresh window,
I tried a variety of methods have failed,
R=GetClientRect (hWnd, & amp; The rect);
If (R)
The InvalidateRect (hWnd, & amp; The rect, FALSE);
The FlashWindow (hWnd, TRUE);

HRGN HGN=CreateRectRgn (0, 0, the rect. Right, the rect, bottom);
RedrawWindow (hWnd, & amp; The rect, HGN RDW_UPDATENOW);
InvalidateRgn (hWnd, HGN, FALSE);
UpdateWindow (hWnd);
PostMessage (hWnd, WM_PAINT, 0, 0);
SendMessage (hWnd WM_SIZE, 0, 0);

How to refresh,
  • Related