Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

CMDIFrameWnd question

Posted on 2001-06-13
Last Modified: 2013-11-20
How can I set the CmdShow (Maximized or Normal) status of the ChildFrm windows from within the MainFrm window.
(I do not want to do it from the childfrm code by ActivateFrame method but from the MainFrm window).

Question by:yoavo

Expert Comment

ID: 6186797
call ChildFrames ShowWindow()-member and pass parameter


Author Comment

ID: 6186856
This is not what I was looking for.
I do not want to maximize a specific CChildFrm window. I want to set a style (or something like this) in the creation/initialization of the MainFrm which will cause all the ChildFrm's to open maximized.

LVL 12

Expert Comment

ID: 6186879
dear Yavo
you already ask about that in your previus q.
CMainFrame haven`t such feature. So you must dervie your own CMdiChildWnd class to handle ActivateFrame and use it in all DocTemplates you have registered in the app.
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.


Expert Comment

ID: 6188411
migel is right. You can't do that from the parent window, at least not too much nice.
Use PreCreateWindow() function of your child window, this is the natural place to manage the window's look.

Author Comment

ID: 6189615
My problem is that I want my MDI program to check if the child window is maximized within
the parent window when the program is terminated, and to restore that
state the next time the program is run.
If I do it on ActivateFrame as you suggested than all the child window will be open in the same way, ignoring the fact that the user might change the status of a certain child window, and expect that the next window will be open in the same way.
Ofcourse I can do it in an ugly way by reading the status only for the first child window but I am trying to avoid that...

LVL 12

Accepted Solution

migel earned 20 total points
ID: 6189694
look at PAQ for "storing window state"

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

Title # Comments Views Activity
Expand data scrubbing tool 13 35
Hibernate methods 2 77
fizzArray  challenge 1 96
how to split multiple lines delimiter : 8 109
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 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