title: MFC can't redraw CTabCtrl?
body: <p>On my MFC form (with tabcontrl controls and ok/cancel button) , I only use the Onresize event(not use ON_WM_ERASEBKGND ,..) as follows:</p>
  <pre><code> CDialog::OnSize(nType, cx, cy);
   m_cTab.SetWindowPos(NULL, 0, 0, cx, cy - 36, SWP_NOACTIVATE | SWP_NOZORDER);
      
  m_cTab.Invalidate();
  int w, h; GetDlgItem(ID_MultiplotOk)-&gt;GetWindowRect(&amp;rec);
  GetDlgItem(ID_Ok)-&gt;SetWindowPos(NULL, cx - 180, cy - 30, rec.Width(), rec.Height(),  SWP_NOACTIVATE | SWP_NOZORDER);
  GetDlgItem(ID_Cancel)-&gt;SetWindowPos(NULL, cx - 90, cy - 30, rec.Width(), rec.Height(),  SWP_NOACTIVATE | SWP_NOZORDER);
  this-&gt;Invalidate();
  this-&gt;UpdateWindow();
  </code></pre>
  <p>the code works ok, however the tabcontrol is not redrawn as expected.</p>
  <p>Did I miss the thing?</p>
  <p><a href="https://i.stack.imgur.com/wlGlZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wlGlZ.png" alt="enter image description here" /></a></p>