Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refresh the contents of the entire window? 1

Status
Not open for further replies.

computerwhiz

Programmer
May 1, 2002
28
US
How do I refresh the entire contents of the main window and all subwindows, listboxs, static boxes, etc. after resizing my main window.. As my main window is resized the other controls are repositioned according to the new window size, but the text is always staying without refreshing, and yes I do have the flag set to true for repaint after moving.

Code:
    case WM_SIZE:
    {
      RECT rectWin;
      GetClientRect(hwnd, &rectWin);
      MoveWindow(hwndSTS1, rectWin.top+10, rectWin.left+5, rectWin.right-25, 20, TRUE);
      MoveWindow(hwndLB, rectWin.top+10, rectWin.left+30, rectWin.right-25, 200, TRUE);
      MoveWindow(hwndBT1, rectWin.top+10, rectWin.left+230, 100, 20, TRUE);
      MoveWindow(hwndBT2, rectWin.right-115, rectWin.left+230, 100, 20, TRUE);
      MoveWindow(hwndBT3, rectWin.top+10, rectWin.left+260, 100, 20, TRUE);
      MoveWindow(hwndBT4, rectWin.right-115, rectWin.left+260, 100, 20, TRUE);
      MoveWindow(hwndSTS, rectWin.top+10, rectWin.left+290, rectWin.right-25, 20, TRUE);
      MoveWindow(hwndPB, rectWin.top+10, rectWin.left+320, rectWin.right-25, 20, TRUE);
    }
 
I think you should call InvalidateRect(yourWnd, NULL, NULL, TRUE); and after that call UpdateWindow(yourWnd). All the rest deppends on how is implemented WM_PAINT handler.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top