Link to home
Start Free TrialLog in
Avatar of lim_cheryl
lim_cheryl

asked on

How to set size of MDI child window?

I have a MDI application and wish to fix the size and position of a child window. I found that I need to use SetWindowPos but do not know when I should call it. Please advice. Thanks.
Avatar of PavelY
PavelY

Hi,

Use SetWindowPos whenever you want to change the size (or position) when the window exists.
If you want to change size or position before the window is created, override CWnd::PreCreateWindow, and chage the x,y,cx,cy members of the CREATESTRUCT appropriately.

ASKER CERTIFIED SOLUTION
Avatar of plaroche
plaroche

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial