title: win32 redrawing after resizing
body: <p>I have next problems</p>
  
  <p>I have base class "Shape", it cointains virtual function <code>draw(HWND)</code>, I have child class "Line" which contains same function <code>draw(hwnd)</code>.</p>
  
  <p>When I draw line in <code>WM_MOUSEMOVE</code>, it is all ok, but when I minimize or change window size, my line disappear</p>
  
  <p>What I need to do?</p>
  
  <p>I have vector with pointer to base class
  vector ff;
  Shape *f;</p>
  
  <pre><code>case WM_LBUTTONDOWN:
  {
  
      IsDrawing = TRUE;
  
      StartX = LOWORD(lParam);
      StartY = HIWORD(lParam);
      EndX = LOWORD(lParam);
      EndY = HIWORD(lParam);
  
      switch(iShape)
      {
      case LINE:
              f=new Line();
          break;
      case  RECTANGLE:
          f=new MyRectangle();
          break;
      }
  
      f-&gt;SetBrushWidth(5);
      f-&gt;SetColor(RGB(255,0,0));
      f-&gt;SetStartCoord(StartX,StartY);
      f-&gt;SetEndCoord(EndX,EndY);
      f-&gt;SetMode(1);
      f-&gt;draw(hWnd);
      break;
  }
  
  case WM_MOUSEMOVE:
  if( IsDrawing == TRUE )
  {
      f-&gt;SetEndCoord(EndX,EndY);
      f-&gt;SetMode(2);
      f-&gt;draw(hWnd);
      EndX = LOWORD(lParam);
      EndY = HIWORD(lParam);
      f-&gt;SetEndCoord(EndX,EndY);
      f-&gt;SetMode(2);
      f-&gt;draw(hWnd);
  }
  
  break;
  
  case WM_LBUTTONUP:
  
  
  EndX = LOWORD(lParam);
  EndY = HIWORD(lParam);
  
  f-&gt;SetEndCoord(EndX,EndY);
  f-&gt;SetMode(3);
  f-&gt;draw(hWnd);
  ff.push_back(f);
  
  IsDrawing = FALSE;
  
  break;
  </code></pre>
  
  <p>It is drawing ok, but when change windows size</p>