Solved

Desktop / MDI clone

Posted on 1998-11-30
7
254 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 29
Include multiple hostnames in this command? 3 53
Shell script to login to remote m/c and execute commands 10 78
mapBully challenge 6 115
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

895 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

14 Experts available now in Live!

Get 1:1 Help Now