Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to resize a MDI window?

69 views
Skip to first unread message

Peter J. Wahle

unread,
May 11, 1999, 3:00:00 AM5/11/99
to
How does one resize and reposition a MDI window automatically?
I've tried using the online help, but have only been able to resize
the contents not including the frame.

Eugene Kain

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
Hello,

You are probably trying to resize the view window, you need to resize its
frame window (usually derived from CMDIChildWnd). You can use code like:

void CYourView::ResizeIt()
{
CFrameWnd* pFrame = GetParentFrame();
pFrame->MoveWindow( x, y, width, height );
}

You will find additional details in FAQ 3.8 of "The MFC Answer Book": How
do I programmatically resize or reposition a view? You can find screen
shots and a sample program at <http://www.mfcfaq.com>.

Find more than 130 similar and advanced tips and techniques in "The MFC
Answer Book: Solutions for Effective Visual C++ Applications". For
additional details, surf to <http://www.mfcfaq.com>.
Good luck!

- Eugene Kain
Author of "The MFC Answer Book: Solutions for Effective Visual C++
Applications" (Addison-Wesley, 1998).
Visit the book's web site at <http://www.mfcfaq.com>
Get information, reviews and best prices at
<http://www.amazon.com/exec/obidos/ASIN/0201185377/mfcfaqcom>

Peter J. Wahle wrote in message <7hakro$ds2$1...@vixen.cso.uiuc.edu>...

0 new messages