Automatic Layout of Resizable Dialogs in WTL

WTL LogoToday, 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_LAYOUT_MAP() and END_LAYOUT_MAP() 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!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>