Solved

CMDIFrameWnd question

Posted on 2001-06-13
6
299 Views
Last Modified: 2013-11-20
Hi,
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).

thanks,
Yoav.
0
Comment
Question by:yoavo
6 Comments
 
LVL 2

Expert Comment

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

ShowWindow(SW_SHOWMAXIMIZED)
0
 

Author Comment

by:yoavo
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.

0
 
LVL 12

Expert Comment

by:migel
ID: 6186879
Hi!
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.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 5

Expert Comment

by:ekc
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.
0
 

Author Comment

by:yoavo
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...

0
 
LVL 12

Accepted Solution

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

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
Named range not carried over 10 63
VBA "SendKeys" Syntax for Multiple Keystrokes 7 109
wait notify demo infinite loop 3 114
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

831 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