Click to See Complete Forum and Search --> : Howto resize and move a dialog?


Magnus Ohlin
April 16th, 1999, 06:47 AM
Hiya!

I have created a modal dialog and wants it to be in the upper left corner of the screen and have its size as in the resource editor.
I have tried to put MoveWindow in OnInitDialog but that doesn't work.

Anyone got any idea?

Thanks
Magnus

Fabian
April 16th, 1999, 10:09 AM
Hi, try using SetWindowPos() instead of MoveWindow().

SetWindowPos(NULL, newX, newY, 0, 0, SWP_NOSIZE|SWP_NOZORDER);

Using the flags SWP_NOSIZE|SWP_NOZORDER, the window just will move.

Fabian