Thread: Question????

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    184

    Question????

    Hello everyone,

    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??????

    Please Help?????
    Kendal

    BRIEF SUMMARY:

    Orders.exe
    calls by system command
    Image Viewer.exe

    Orders will not receive control back until Image Viewer.exe is closed.

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    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");

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    Thanks Salem,

    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,
    Kendal

  4. #4
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    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
    Kendal

  5. #5
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    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...

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    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???

    Thanks,
    Kendal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM