I have used the CreateProcess Api to execute a console program. Everything works fine, the only thing that I don't like is that the console disapears after the execution of this console program. The problem is that it has to stay there,so that the user can read the output of the program is there any chance to do this ? sign CyBerian
Posted on 2001-02-14 14:47:00 by CyBerian
Well, yes and no. I'm not sure if you can leave the actual console on the screen after the program terminates, however you can redirect the stdout of the console program. This is how a lot of professional packages can display the information from a console based compiler in a seperate window as the program compiles. (See CreateProcess and STARTUPINFO in the Win32 API for more information.)
Posted on 2001-02-15 03:33:00 by Racso
thx. I will take a look at this :) sign CyBerian
Posted on 2001-02-15 04:21:00 by CyBerian
hmm seems to be a bit complex to me Does anyone know a nice tutorial or an example with comment about this stuff? sign CyBerian
Posted on 2001-02-15 05:24:00 by CyBerian
Try calling your program from a .bat file. Call the .bat file with CreateProcess. If nothing else, you can end your .bat file with pause.
Posted on 2001-02-15 06:34:00 by Ernie
hey that's a nice idea... But I already did the Pipe thing... (Found a nice Tutorial about it on Icezelion's Page :)) Now I have got two other problems.. First I need an MultiLine EditBox with a fixed width for the letters to display the Output correctly (I am not quite sure how to do this. Is it possible to create a new Font and then do a send it to the WM_SetFont Message of the EditBox?) The other thing I can't figure out is how to isolate some parts out of a String. (Some kind of SubString function) I am a little bit new to Assembler and I hope that someone can give an example of doing something like this. sign CyBerian
Posted on 2001-02-15 15:39:00 by CyBerian
You should be able to send a WM_SETFONT message to every window, regardless of the style of window. The only window that it might not work on are ones that have a caption, like popup windows. Also, detecting various portions of a string is only as difficult as you need it to be. If you know that, after a certain number of words, there's a part you want deleted, you can count then number of spaces (20h). If you're unsure, you can use a gramatic checker, like searching for specific characters in a certain order. For instance, if a compiler comes back with an error "ERR (1223): Invalid expression", you can assume that the first part until the first '(' is the type (warning, error, or fatal), then the part in paranthesis is the line number, error number, whatever, and the last part is the exact error message. It's a little more difficult and requires more accurate information on your part, but gives more accurate results.
Posted on 2001-02-15 20:33:00 by Racso
This wouldn't be the problem I think, but how is it possible to isolate one special char of the string and for example copy it to another string? If I would be able to do so it would be easy to write a routine which isolates special parts of the string. But I don't know how to get the charcters out of the string on their own. sign CyBerian
Posted on 2001-02-16 05:31:00 by CyBerian