Re: Child Window Creation
Thanks for the suggestion David. I would do that but....
When PreSubclassWindow gets called as a result of Create begin called on the
control, the HWND for the control looks valid, but when I try to create
child controls with it, it throws an exception. So it will try to create it
in PreSubclassWindow method and will crash.
Try the sample I posted earlier.
AliR.
"David Ching" <dc@remove-this.dcsoft.com> wrote in message
news:eur9BplzJHA.4800@TK2MSFTNGP06.phx.gbl...
"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message
news:A11Ml.15235$jZ1.1214@flpi144.ffdc.sbc.com...
Since WM_PAINT is getting called before my posted message when
DDX_Control
is used, I'm going with the flag solution for now.
Unless someone can come up with a better solution.
Create your child windows in a method called in both OnCreate() and
PresubclassWindow(). In that method, quickly abort if any of the child
windows have already been created, e.g. m_childWindow.GetSafeHwnd() !=
NULL. Then you don't need a m_bCreated flag.
-- David