Solved

CMDIFrameWnd question

Posted on 2001-06-13
6
306 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
[X]
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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
NotAlone Challenge 20 91
mapBully challenge 6 195
wordcount challenge 11 163
Is there a simple front-end menu system. 9 141
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

733 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