Solved

Desktop / MDI clone

Posted on 1998-11-30
7
265 Views
Last Modified: 2013-11-20
We are developing an application that serves as a container to other applications - sort of a "desktop".
The container is to work like an MDI program, in which independent "child" applications work like child
windows  in relation to the container application. Our application works in Win'95 and Win'98 and should be Win NT compatible.

The way the program runs is as follows:
        * The container application is run.
        * Subsequently  - from withing the container application, various applications (not all in-house) are invoked            using CreateProcess.
     The container should then serve as a parent window for each application run.

Originally, after using CreateProcess, we  set the container as the parent of this application using the SetParent
function. The problems with this method was:
         1.  The official Microsoft help documentation states clearly that this method is not allowed (help for the                             ::SetParent function). It works fine most of the time but upcoming versions may not support it.
         2. On some computers, there are problems  moving the child applications.  The mouse and the window don’t                move together, and so on…

So we switched to another method.
    Instead of using SetParent, we developed a class that re-implements most of the MDI  window features (like: tile, cascade, autotile, close all application, and so on..) But the problem was with handling the focus of the container window. When the container window  is activated, we change the z-order of the child applications with the SetWindowPos() function. It works most of the time. But there are specific cases - which we have not been able to pinpoint any generalization of, it doesn’t work. The cases are not consistent so we can’t describe the cases, but it happens. Using SPY we found that the message WM_WINDOWPOSCHANGING is sent to the child
applications but sometimes they don’t get the WM_WINDOWPOSCHANGED.

Creating the applications as ActiveX/COM components does not seem to be an option due to the fact that not all the run applications have been developed by us, and performance loss for those that are "in-house" would probably be too great. Would an ActiveX wrapper be a possibility?

What is your advice? Can we solve the problems in either of our previous methods or do you have another recommended method?

Thank you
Chaya Finkelstein
haya_u@ultramind.co.il
0
Comment
Question by:Chaya
[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 Comments
 
LVL 2

Expert Comment

by:wyy_cq
ID: 1325539
"The cases are not consistent "

so you can change the position for a few times.
i think it will work though it is not a good idea.
0
 

Author Comment

by:Chaya
ID: 1325540
Adjusted points to 400
0
 

Author Comment

by:Chaya
ID: 1325541
Edited text of question
0
Independent Software Vendors: 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!

 

Author Comment

by:Chaya
ID: 1325542
Adjusted points to 1000
0
 

Expert Comment

by:rakeshkalra
ID: 1325543
If your application is just for windows NT, then you can try CreateDesktop. This desktop will serve as an additional desktop similar to windows desktop. You can run any application on it like you run on the original desktop.
You can switch between desktops using SwitchDesktop.
Other APIs are:
OpenDesktop();
SetProcessWindowStation();
SetThreadDesktop();
CreateWindowStation();
OpenWindowStation();

I hope this serves as another approach to solve your problem.
0
 

Author Comment

by:Chaya
ID: 1325544
Thank you rakeshkalra, but, the program MUST work in '95 and '98. I know about the Desktop functions in NT, but they don't help me for '95 and '98. Do you know how to "downgrade them"?
0
 
LVL 2

Accepted Solution

by:
jstolan earned 1000 total points
ID: 1325545
If your problem is simply not getting the WM_WINDOWPOSCHANGED message, (or any other message) can you simply send this message multiple times from your parent "desktop" application?  This message is totally benign, and multiple repeats will not cause any problem.

Just a thought.
0

Featured Post

Industry Leaders: 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
Decoding 32 bit binary streams 6 59
modThree challenge 4 155
FizzBuzz challenge 9 87
How do I get Window Title of all opened process? 4 61
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. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

710 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