Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

MDI Child Windows

Posted on 1997-04-10
11
Medium Priority
?
436 Views
Last Modified: 2010-04-06
I've been fooling with the API call SW_HIDEWINDOW to hide my MDI child windows. Problem is that when I show them, the window status has been changed to ws_normal. I need to show and hide Child windows in a maximized state.
0
Comment
Question by:ericw
[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
  • 7
  • 4
11 Comments
 
LVL 3

Accepted Solution

by:
mheacock earned 120 total points
ID: 1335300
Immediately set the window state to maximized right after your
show window command.
0
 

Author Comment

by:ericw
ID: 1335301
Tries This, But Seems To Be Over-ridden By The MDI Parent. This is how its hidden:

 ShowWindow(MyChild.Handle, SW_HIDE);

I Then Show it By :

SetWindowPos(MyChild.handle, 0,0,0,0,0,SWP_NOSIZE OR SWP_NOMOVE OR SWP_SHOWWINDOW);

It's here that the problem lies .... Child Is Now Visible, But No Maximized And Without Focus.
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1335302
Have you tried:

   ShowWindow(MyChild.Handle, SW_SHOWMAXIMIZED);

I can't help much for for only 25 pts.  If this does help,
I do hope you'll see fit to not grade this at the minimum.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 3

Expert Comment

by:mheacock
ID: 1335303
Ignore the comment about the grading...I didn't notice you were
the same person that asked the splitting file question.  You
graded well there.

But I still can't help much more for only 25 pts.  I hope my
last comment solves your problem though.
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1335304
I see you raised the points, did the solution help?
0
 

Author Comment

by:ericw
ID: 1335305
ShowWindow(MyChild.Handle, SW_SHOWMAXIMIZED);

Nope, Seems to work if you have one MDI child, but goes adrift if you are cycling between 4 and 5.
It starts showing the wrong one ( and I double checked my code) despite being given the window handle ????
I think this was why I switched to SetWindowPos.
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1335306
Are you using D1 or D2?  I'm presuming D2.
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1335307
Okay...I think I have it....

   SendMessage(MDIParent.Handle, WM_MDIMAXIMIZE, WParam(MDIChild.Handle), 0);

Check in the help file for the Windows Message, WM_MDIMAXIMIZE.  I'm not sure if the WParam, cast will work, but I do believe it is defined in Windows.pas.  Anyhow, I'm very positive that this is the correct way to maximize an MDI child.
0
 

Author Comment

by:ericw
ID: 1335308
I'm using Delphi 1.0, but I'll try the revised SendMessage. It should still work for D1, or at least something fairly similar should be available
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1335309
The call is the same...Win32 or Win16.
0
 

Author Comment

by:ericw
ID: 1335310
SendMessage(MDIParent.Handle, WM_MDIMAXIMIZE, WParam(MDIChild.Handle), 0);

Tried This In Several Different Flavours....All Failed };<

Finally Ended Up Cycling Thru The List Of ChildWindows.....This Must Be Some Or Other MDI Problem.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

648 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