|Updated: 6th November 2006|
In this article I forgot to mention the WS_EX_CONTROLPARENT style, which can be employed to achieve the effects described by the various implementations when dealing with dialogs only
Why did I forget? I had planned to mention the style, but just got bogged down in the minutiae of the writing process (as one tends to do), and didn't remember until I got an email from a curious reader. Very embarrassing!
The original work was done a long time ago, when I recall that I had problems with the control-parent style back then (though cannot, of course, recall what they were!). The other, more compelling, reason is that the techniques described can be applied to embedding of child dialogs (and other types of composite windows) within non-dialog types.
I recently had occasion to need to reuse the technology in such a scenario where I needed to lay out a wide variety of controls and other types of windows (including the MS Web Browser and Media Player ActiveX controls, custom windows, dialogs, etc.) within a parent window which was not a dialog, according to logon-time downloaded XML configuration scripts. I used the technology that the article describes in order to manage this exceedingly messy and dynamic situation, and that is what made me think of writing it up. The article didn't start out dealing with dialogs embedded within dialogs, but just evolved into that simpler form in order to keep down the size.
Clearly not mentioning WS_EX_CONTROLPARENT is not just an embarrassing oversight for me: it would be unfortunate if readers of the magazine didn't use this simple (and adequate for most purposes) technique. However, I believe the content itself is illuminating, and of use in the wider contexts for which WS_EX_CONTROLPARENT doesn't cut the mustard.
Thanks to the reader for his enquiry.
Note: This was printed in WDN in response to the reader's email.