diff options
author | bseifert <none@none> | 2003-12-20 11:02:25 +0300 |
---|---|---|
committer | bseifert <none@none> | 2003-12-20 11:02:25 +0300 |
commit | 16c05cbc202ea903ca4909e690e0263afae70fc6 (patch) | |
tree | e974b96f6d59ccc5ece0b9df1c4403c4661eeac6 /windirstat/layout.cpp | |
parent | 1b476af083be6a3751b5e7ff4d33a6683af51441 (diff) |
Fixed repainting problem in resizable dialogs.
Diffstat (limited to 'windirstat/layout.cpp')
-rw-r--r-- | windirstat/layout.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/windirstat/layout.cpp b/windirstat/layout.cpp index f8cbd0a..9bb0042 100644 --- a/windirstat/layout.cpp +++ b/windirstat/layout.cpp @@ -101,6 +101,11 @@ void CLayout::OnSize() CSize diff= newDialogSize - m_originalDialogSize; + // The DeferWindowPos-stuff prevents the controls + // from overwriting each other. + + HDWP hdwp= BeginDeferWindowPos(m_control.GetSize()); + for (int i=0; i < m_control.GetSize(); i++) { CRect rc= m_control[i].originalRectangle; @@ -111,8 +116,11 @@ void CLayout::OnSize() rc+= move; rc+= stretch; - m_control[i].control->MoveWindow(rc); + hdwp= DeferWindowPos(hdwp, *m_control[i].control, NULL, rc.left, rc.top, rc.Width(), rc.Height(), + SWP_NOOWNERZORDER|SWP_NOZORDER); } + + EndDeferWindowPos(hdwp); } void CLayout::OnGetMinMaxInfo(MINMAXINFO *mmi) |