Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbseifert <none@none>2003-12-20 11:02:25 +0300
committerbseifert <none@none>2003-12-20 11:02:25 +0300
commit16c05cbc202ea903ca4909e690e0263afae70fc6 (patch)
treee974b96f6d59ccc5ece0b9df1c4403c4661eeac6
parent1b476af083be6a3751b5e7ff4d33a6683af51441 (diff)
Fixed repainting problem in resizable dialogs.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--windirstat/dirstatdoc.h2
-rw-r--r--windirstat/item.h4
-rw-r--r--windirstat/layout.cpp10
4 files changed, 14 insertions, 4 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ee84e33..74fbaa4 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,8 @@
changelog.txt - What has been done to WinDirStat (newest top)
=============================================================
+ * Resizable dialogs: the controls don't overwrite each other any more.
+
2003-12-13 bseifert
* Added size grippers to the resizable dialogs.
* Corrections in French windirstat.rc
diff --git a/windirstat/dirstatdoc.h b/windirstat/dirstatdoc.h
index 981d622..d0307fa 100644
--- a/windirstat/dirstatdoc.h
+++ b/windirstat/dirstatdoc.h
@@ -28,7 +28,7 @@ class CItem;
//
// The treemap colors as calculated in CDirstatDoc::SetExtensionColors()
// all have the "brightness" BASE_BRIGHTNESS.
-// I define brightness as a number from 0 to 3.0: r+g+b/255.
+// I define brightness as a number from 0 to 3.0: (r+g+b)/255.
// RGB(127, 255, 0), for example, has a brightness of 2.5.
//
#define BASE_BRIGHTNESS 1.8
diff --git a/windirstat/item.h b/windirstat/item.h
index 59aa24e..23fa57f 100644
--- a/windirstat/item.h
+++ b/windirstat/item.h
@@ -77,7 +77,7 @@ inline bool operator== (const FILETIME& t1, const FILETIME& t2)
// It is derived from CTreeListItem because it _may_ become "visible" and therefore
// may be inserted in the TreeList view (we don't clone any data).
//
-// Of cource, this class and the base classes are optimized rather for size than for speed.
+// Of course, this class and the base classes are optimized rather for size than for speed.
//
// The m_type indicates whether we are a file or a folder or a drive etc.
// It may have been better to design a class hierarchy for this, but I can't help it,
@@ -86,7 +86,7 @@ inline bool operator== (const FILETIME& t1, const FILETIME& t2)
//
// Naming convention:
// Methods which recurse down to every child (expensive) are named "RecurseDoSomething".
-// Methods which recurse up to the parent (not so expensive) are named "UpwardDoDomething".
+// Methods which recurse up to the parent (not so expensive) are named "UpwardDoSomething".
//
class CItem: public CTreeListItem
{
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)