Solved

How to make MDI child windows maximized by default?

Posted on 1997-05-13
3
399 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ADO Memory leak with DELPHI 2007 37 156
bigDiff challenge 17 75
Use of condition with 'serial' in ansible 2 37
mapAB Challlenge 35 89
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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 …
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now