Sizable dialogs at its easiest
Introduction:
Q: What is the difference between the following two dialogs ? 
A: There is no difference !
The cdxCSizingDialog class is a class derived from CDialog making it very
easy to implement sizable dialogs. I really missed that feature in VC++ (and IMHO it's a
shame to the MFC that it doesn't provide an easy to use way to solve this problem).
However, now it is possible to make your dialogs sizable - you can add this to an existing
dialog in three steps !
In addition to cdxCSizingDialog, you will even find both cdxCSizingPropSheet and cdxCSizingPropPage in the two files that are part of the zip, but these are considered to be in beta stadium for now (they seem to work ... I only have problems with the sizing icon).
The most important features of cdxCSizingDialog are:
- Easy to add even to already existing dialog classes.
- Several ways controls may react on window size changes, from a simple nothing to a percentage-value;
- Automatic creation of a standard-windows sizing icon (as used by the explorer's windows) in the lower right corner of your dialog.
- Support to load/store window position to the registry.
Requirements:
- Tested and used with Visual C++ 5.0.
Files:
- cdxCSizingDialog.h (header; can be found in the archive)
- cdxCSizingDialog.cpp (implementation; can be found in the archive)
- Sample application (includes a documentation; see sub-directory "doc" in the archive)
How to use:
Make your dialog sizable in 3 steps !!
- Every control on our dialog needs a DDX value of class control (use Class Wizard in the resource editor).
- In both the header and implementation file, replace all strings "CDialog" by "cdxCSizingDialog" and insert an #include "cdxCSizingDialog.h" to your header file.
- In OnInitDialog(), make a call to AddSzControl() for each control you want to resize/reposition if the dialog's size changes.
- Additional features might be used... see the documentation.
-
A simple tutorial is included in the documentation that might
be found here

Comments
hum....
Posted by Legacy on 03/07/2003 12:00amOriginally posted by: kim jyeong hyeon
Cannot open include file: 'ResizableDialog.h': No such file or directory....
downloaded file doesn't have a header file(ResizableDialog.h)....
....
Reply
Problems with OCX
Posted by Legacy on 07/17/2002 12:00amOriginally posted by: Olaf Oelsner
I tried to use an OCX the dialog, but
it won't be resized.
Does anybody have an idea ?
Thanks
Reply
GREAT WORK!
Posted by Legacy on 10/19/2001 12:00amOriginally posted by: abscess
You just saved me (estimating) days of frustrated coding this month alone!
Replylatest version is HERE
Posted by Legacy on 08/13/2000 12:00amOriginally posted by: oeschtle
hi there,
i contacted the author. he told me the latest version is over there:
http://www.datamekanix.com/
look for the article 'dynamic child window positioning'.
it includes DYNAMIC:
- Dialog
- ChildDlg
- FormView
- PropSheet
- PropPage
a couple of changes and improvements.
enjoy,
oeschtle
ReplyProblems with MoveWindow
Posted by Legacy on 04/12/2000 12:00amOriginally posted by: Takki
This class is good, but still has some bugs...
ReplyA very cruel bug is that whenever I try to move one of my controls with MoveWindow I get an error (assertion failed). I tried the MoveWindow at several positions (OnInitDialog, OnSize etc.), but it's always the same. I looked into the MFC code and saw that my controls aren't valid hwnds (::IsWindow(m_hWnd) fails). I tried to contact the author, but both emails aren't working. Has anyone a solution for this problem?
Problems with MoveWindow
Posted by Legacy on 04/12/2000 12:00amOriginally posted by: Takki
This class is good, but still has some bugs...
ReplyA very cruel bug is that whenever I try to move one of my controls with MoveWindow I get an error (assertion failed). I tried the MoveWindow at several positions (OnInitDialog, OnSize etc.), but it's always the same. I looked into the MFC code and saw that my controls aren't valid hwnds (::IsWindow(m_hWnd) fails). I tried to contact the author, but both emails aren't working. Has anyone a solution for this problem?
RE: You don't need DDX control - just NOT in this case
Posted by Legacy on 02/15/2000 12:00amOriginally posted by: Dmitry Zemskov
ReplyProblems with Splitter in a Sizable Dialog
Posted by Legacy on 10/04/1999 12:00amOriginally posted by: Joern Engmann
If someone have to put two (or more) elements, separated by a Splitter (like in the Explorer) in a sizable Dialog he will get some Problems.
When I does this the Dialog was much bigger at starting Time as I wanted and the Splitterelement was overridden by Element on it's left side. When I make the left Element mdNone in x-direction then all works.
I need a hint to get the left Side resizable.
ReplyYou don't need DDX control
Posted by Legacy on 07/28/1999 12:00amOriginally posted by: Scott Coursin
ReplyVery Cool
Posted by Legacy on 07/21/1999 12:00amOriginally posted by: Johnathan James
I knew I would find something cool on CodeGuru to do this, but I thought I would try on my own first.. after about 2 hours trying to get those controls to resize correctly, I came to CodeGuru and saw this code. Not 10 minutes later, I had the dialog just like I wanted it.
This code is excellent! Thanks a lot!
Reply
Loading, Please Wait ...