Mail Archives: djgpp/2003/04/23/13:30:04
Kendal <gvector1 AT bellsouth DOT net> 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.
- Raw text -