Win9x, NT4, MFC
First Released: August 11, 1998
Date Posted: April 27, 2000
Article Last Updated: April 27, 2000
Code Last Updated: August 04, 2000
by Hans Bühler
This article replaces my former article "Dynamic child window positioning"
See the what's new section to find out whether it's worth changing
What's this article about?
I'll introduce you to some of my code that has will make your windows support automatic
repositioning of their child controls. I'll call such windows dynamic (since they
don't have a static size and child control ordering but dynamic ones):
The image below shows the docked dialog:
What classes are part of this release?
General base class(es) used to implement dynamic child window repositioning in any
CDialog replacement that allows you to dynamically move your controls.
The same as a dialog base-class for child window dialogs.
CFormView, now supports the scrollbars, knows its own size perfectly and stuff!
A controlbar with an embedded dialog that is dynamically moving its childs.
The bar itself uses the CSizingControlBar library by Cristi Posea, published at www.datamekanix.com.
- New and better code :)
This is why we can not simply replace a
code into a
cdxCDynamicWnd code. :(
- Now works with
HWNDs and IDs instead of
Therefore you don't need to explicitely create DDX control variables anymore. *
- Supports "dynamic maps" - as known from message map macros.
These maps map IDs to a resizable control. *
- Now uses
::DeferWindowPos() instead of
to decrease flickering (for all classes). *
- Anti-Flickering system for
cdxCDynamicDialog (looks much better!). *
- Supports scrolling in
CFormView (and any other class, if you enable it
by hand). *
- "Auto-Positioning" feature for dynamic dialogs & property pages. *
- Support for dialogs that are meant to be "child control dialogs" - if often embedd
dialogs and this class helps to make your child controls remain in a suitable place :)
A ControlBar solution.
* ~ Suggested by users of my cdxCDynamicControlsManager :)
However, since I rewrote much of the code of the
cdxCDynamicControlsManager, you cannot
switch from that class to my new
cdxCDynamicWnd without further work to be done;
cdxCSizingDialog into a
cdxCDynamicDialog would need
help by you.
A documentation file is included in the sub-directory
Any suggestions & bug-reports are welcome.
||sources & documentation
(the .zip file includes the sources of CSizingControlBar v2.43)
Copyright © 1998-2010 DataMekanix. All rights reserved.