Because this is an open forum, it is good protocol to share your solution so others can benefit.
news:2be9328c-42ab-4fbf-849d-391e673212fc@d19g2000prh.googlegroups.com...
Thanks guys for suggestions ...
That helped me in getting it done ..
On May 20, 12:11 am, Joseph M. Newcomer <newco...@flounder.com> wrote:
I have no idea what a "static dialog box" is. However, to change the size of *any* dialog
box use SetWindowPos, e.g.,
SetWindowPos(NULL, 0, 0, newwidth, newheight, SWP_NOMOVE | SWP_NOZORDER);
You would not use OnSize for this; OnSize tells you that the size has *changed* and trying
to change it again from within the OnSize handler is probably a bad idea. OnInitDialog
would be the place to handle this.
Note that you have changed the specifications in the last sentence. You said "Not change
the position" in the first sentence, then said "retain the default position (center)". If
you resize it without changing the position, it will not be centered if you change the
size!
To do this, you would call CWnd::CenterWindow after resizing it.
joe
On Tue, 19 May 2009 02:05:19 -0700 (PDT), jklioe <ranu2...@gmail.com> wrote:
I want to set size of static dialog box while loading? without
changing its position
Do we need to handle OnSize event for this ? Or just handling it in
OninitDialog using SetWindowPos is sufficient ?
How to retain the default position(center) of dialog box ?
Joseph M. Newcomer [MVP]
email: newco...@flounder.com
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm