Solved

How to make MDI child windows maximized by default?

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.

726 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