Quote:
> hi,
> I designed a Dialogbox in VC++ 6 and use CreateDialog to display it, my irc
> client
> is almost done and I have a question about the resizing of the dialogbox I
> want all
> objects to "size" with the dialogbox (so I want my richedit and editbox to
> become
> bigger when you make the dialogbox bigger etc.) How do I do that? Do I have
> to
> catch off a resize message?
> thanks,
> Matthijs
Handle the WM_SIZE message in the dialog box. It is passed the new cx
and cy client dimensions. You can use those numbers to compute the
desired new size of the child windows, then call MoveWindow on each
child.
There is a {*filter*} trap to watch out for in a WM_SIZE handler: It is
called before the child windows have been created, which will make
MoveWindow assert. So put in a check like:
if (m_richedit.GetSafeHwnd())
{
m_richedit.MoveWindow(...);
Quote:
}
--
Scott McPhillips [VC++ MVP]