Solved

Desktop / MDI clone

Posted on 1998-11-30
7
251 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

20 Experts available now in Live!

Get 1:1 Help Now