WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
Introduction:Q: What is the difference between the following two dialogs ?
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.
- Tested and used with Visual C++ 5.0.
- 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)
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