Solved

CMDIFrameWnd question

Posted on 2001-06-13
6
296 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

18 Experts available now in Live!

Get 1:1 Help Now