Today, CodeProject announced me about new WTL article has been published. This one is very interesting. Till Krullmann explains how to implement layout manager for dialog boxes using WTL in his article Automatic Layout of Resizable Dialogs. The concept is derived from WTL map based on macros. So, Till introduces new macros for that purpose: _BEGIN_LAYOUTMAP() and _END_LAYOUTMAP() as well as new base class for your own dialogs CDialogLayout:
So I came up with a “semi-automatic” solution that pretty much meets the spirit of WTL. This solution is called “layout maps” and is, like all other ATL/WTL maps, based on macros. Though I don’t particularly like hiding lots of code behind the innocent-seeming macros, I found it adequate in this case as it keeps things readable.
Equipped with Till’s tools you can implement resizable dialog boxes with a few steps. Thanks Till!