Solved

Desktop / MDI clone

Posted on 1998-11-30
7
267 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
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.

 

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

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

615 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