Setting the initial position of a dialog-based application
Posted
by Mihai Filimon
on April 19th, 1999
Explanation
After CreateDialogIndirect, the MFC call CenterWindow. The last line of this function call SetWindowPos with position of window, and with -1, -1, as width and height of window. So the WM_WINDOWPOSCHANGING is obviously.Date Last Updated: April 19, 1999

Comments
Fixed Position Dialog?
Posted by Legacy on 09/25/2003 12:00amOriginally posted by: Jon Ha
ReplyWorks Great
Posted by Legacy on 04/09/2003 12:00amOriginally posted by: Trent
I added the code to my program and it works well.
Thanks a lot
ReplyModeless
Posted by Legacy on 12/25/2002 12:00amOriginally posted by: Dep
In the modeless option this solution doesn't work...
ReplyHiding a modal dialog on startup
Posted by Legacy on 04/30/2002 12:00amOriginally posted by: Bosyotik
ReplySetting position
Posted by Legacy on 10/17/2000 12:00amOriginally posted by: Wayne Irons
Setting the initial position of the dialog is working fine, but how can I also set the initial size? It seems that even if I set lpwndpos->cx and ->cy, they're ignored because SetWindowPos was called with SWP_NOSIZE as a flag...
ReplyHow to begin Application with a maximised window size?
Posted by Legacy on 05/17/2000 12:00amOriginally posted by: Manish
ReplyUse DialogBox's properties if the position is fixed
Posted by Legacy on 04/20/1999 12:00amOriginally posted by: Xiaolong Li
Easier way:
1. Select your DialogBox from resource, get "Properties"
Reply2. "General" Tab: fill "X Pos" and "Y Pos"
3. "More Styles" Tab: check "Absolute Align".
SetWindowPos() works
Posted by Legacy on 04/19/1999 12:00amOriginally posted by: Joselito Santana
Reply