Solved

How to make MDI child windows maximized by default?

Posted on 1997-05-13
3
407 Views
Last Modified: 2013-11-20
I've been trying to come up with a good way to make MDI child windows be maximized when they are created.  I have a way for the window to be maximized by default, but the mainframe doesn't know about it.  ie. the system buttons are not displayed in the menubar.
0
Comment
Question by:gyurko
  • 2
3 Comments
 

Accepted Solution

by:
pjn earned 50 total points
ID: 1301507
You need the following in your MDI child frame class:

void CYourMDIChildFrame::ActivateFrame(int nCmdShow)
{
  if ((bWantMDIMaximize) && (nCmdShow == -1))
    nCmdShow = SW_SHOWMAXIMIZED;
 
  CMDIChildWnd::ActivateFrame(nCmdShow);
}
0
 

Author Comment

by:gyurko
ID: 1301508
I forgot to mention that I was using MFC v2.5 with VC++ 1.52c.  There is no CMDIChildFrame class!
0
 

Expert Comment

by:pjn
ID: 1301509
The CYourMDIChildFrame would be derived from the MFC class CMDIChildWnd. I have called my class ChildFrame because thats what it is a frame window for MDI child windows.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
ODBC Connection Logging, ADO.NET 6 64
sameEnds challenge 3 158
scoreUp challenge 14 62
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question