However, sometimes I want the dialog to be larger when it first opens.
My plan is to pass initial size data into the dialog in the dialog's
constructor. I'd then save those values in the class's data. Then in the
OnInitDialog method (or maybe somewhere else) I'd do "something" to
adjust the dialog's size.
What do I do to make this happen. What do I call (and where) to adjust
the initial size of the window?
Use MoveWindow() or SetWindowPos().
--
David Wilkinson
Visual C++ MVP
As David's mentioned, use MoveWindow or SetWindowPos. You can call
them from your dialog's OnInitDialog handler as you hoped.
Dave
Let me add bells and whistles to what the others have said:
If you want to preserve te state between runs of the program, you can save
the size in the registry, and use it to construct a WINDOWPLACEMENT
structure, which you can impose with the SetWindowPlacement() API (and
doing it in OnInitDialog() is the right place).
Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm