From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Processes Date: 23 Apr 2003 17:27:00 GMT Organization: Aachen University of Technology (RWTH) Lines: 34 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1051118820 29837 137.226.32.75 (23 Apr 2003 17:27:00 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 23 Apr 2003 17:27:00 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Kendal wrote: > run his program fine and call the image viewer okay. But he does not > have focus back on his program. We have tried using SPAWNLP with a > P_NOWAIT option. The root of this problem may well be that you're using the wrong tool for the task. If you're going to try and have full and fine-graind control over Windows apps from your command-line application, DJGPP may not be the right tool to build that with. A Win32 console application built with a native tool like MinGW32 (working under the hood of Dev-C++) would have a much easier time controlling all the details of how other Windows apps start up. > program(DJGPP) and the imageview window opens, but it takes about 10 > to 15 seconds to open. We think the problem is that the main program > receives focus directly back and takes up memory causing the imageview > window to open slowly. Memory can hardly be the issue. Not unless your main program really does exactly that, immediately after it calls the daughter process. Inserting a little sleep() right after the daughter process was started might cure the problem, in that case. > The question is, How can we control Process > Priority? From a DOS program, and thus from DJGPP, I'm quite sure you can't. How to do that in Dev-C++, i.e. MinGW32, is off-topic here. Check out general Windows programming documentation for that. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.