The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: xandaz on July 28, 2011, 04:46:43 PM

Title: Resizing an MDI Client window....
Post by: xandaz on July 28, 2011, 04:46:43 PM
   How does one resize a window or custominzes the size and position of a MDI client window? I've tried to fill in the parameters either in CreateWindowEx or in CREATESTRUCT but it gives nothing. Help needed... thanks
Title: Re: Resizing an MDI Client window....
Post by: dedndave on July 28, 2011, 05:07:09 PM
SetWindowPos

however, the initial position can be set with CreateWindowEx, as well
examine closely the parms you are using - read the MSDN page for CreateWindowEx
especially the x, y, nWidth, and nHeight parameter descriptions
pay particular attention to the use of CW_USEDEFAULT
Title: Re: Resizing an MDI Client window....
Post by: jj2007 on July 28, 2011, 05:38:41 PM
Quote from: dedndave on July 28, 2011, 05:07:09 PM
SetWindowPos

however, the initial position can be set with CreateWindowEx, as well

If you handle WM_SIZE, 4*0 (x/y/w/h) in CreateWindowEx plus MoveWindow for the children is the most efficient solution.
Title: Re: Resizing an MDI Client window....
Post by: dedndave on July 28, 2011, 05:54:56 PM
oh yah - MoveWindow   :bg
i used SetWindowPos because the parms are similar to DeferWindowPos
Title: Re: Resizing an MDI Client window....
Post by: xandaz on July 30, 2011, 02:02:54 PM
    Thanks guys.... jj your tip worked... I don't know why it wasn't working in CreateWindowEx. thanks