Solved

How to make MDI child windows maximized by default?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 69
twoTwo  challenge 35 93
tripleUp challenge 7 74
scoreUp challenge 14 57
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 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

12 Experts available now in Live!

Get 1:1 Help Now