I have a good question here. I have a program here that runs normal, like it is supposed to. This program calls another program to display images. The problem comes in where I want to keep the window open that displays the images, but the program will not receive control back until the image window is closed. How can send control back to the calling program without closing the Image Viewing program??????
calls by system command
Orders will not receive control back until Image Viewer.exe is closed.
By the way,
The Orders program is a console app written in DJGPP and the Image Viewing program is in MFC. That is why it is called by a system command call.
ex. system("imageview mis001.jpg");
That works on my machine when I run it under my IDE(VC.NET). It works with my coworker(DEV C++). The problem is that my administrator, whose program is written in DJGPP and actually calls the Image Viewer program, when he adds the Start into the system command it compiles and runs, but the Image Viewer program does not start. If he takes Start out of the system command, the Image View window opens fine, it just doesn't return contol until the window is closed. He has also gone to a dos prompt to try and execute the "Start ImageViewer Document" command and it works. Why would it work under all those circumstances, but it will not open when called from DJGPP using the start command?????? Any ideas?????? Maybe something to do with DJGPP and the start command?????
Thanks again Salem,
I am about to go and give it a try. Will follow up and let you know how it worked.
Thanks a million
I have a feeling that using the system() function will also pose the same problem.... I recomend that you create a new thread when calling the program...
I am not to familiar with threads and how to create and kill them. The system command using Start actually works on in code on my machine(MSVC.NET) and my coworkers machine(DEV C++), it is just that on my administrators machine(DJGPP), in code written in C, not C++, we are having problems. I am heading over right now to try the latest suggestions. As far as threads, where would be a good reference???