Solved

How to make MDI child windows maximized by default?

Posted on 1997-05-13
3
411 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Title # Comments Views Activity
Complete beginner needs help making a cron job 9 125
Detect CR LF to each line 12 169
Change to event 1 117
Work with App store 7 67
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

766 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