<!-- Download Links -->
Download source files - 105 Kb
Download executable - 18 Kb
<!-- Main HTML starts here -->
QuickWin is a Windows application that spawns a Win32 console application that redirecte its
stderr handles to a window.
The console application is hiden and all I/O operations are made through QuickWin.
This is a very useful program to spawn script programs or console applications in a
Window environment without opening a DOS box.
How QuickWin works
QuickWin contains one or two windows depending on if you want the same
stdout view for
output or another view.
stdin is in the same view as
stdout. The view is a
window and is not limited in space for the output. Commands like cut, copy, paste, find are also
available. QuickView can spawn console applications, shell (COMMAND.COM or CMD.EXE) or batch
files. You start the console application from the command line or browse your disk. You can also
stop and restart the console application many times. The content of the output view can be saved
to file. The last 10 programs are saved into the registry and available for quick start.
The following parameters are available:
Full or Half duplex.
In full duplex, characters are send to stdin and displayed into the view. In half duplex, they
are only send to stdin.
The enter key (CR) can be translated into CR, LF or CR+LF.
Close on Exit.
If the console application is terminated, QuickWin will terminate.
Show Child window.
You can display the DOS box child window. If you want to write into this "Console", open
the "CON" file and write into it.
OEM -> Ansi.
Normally, we must translate characters for console application.
Use Input buffer.
If it is not necessary to send each character one at a time to the
stdin. Characters can be
stored in an input buffer until CR is pressed.
For COMMAND.COM or CMD.EXE, the command is echoed to
stdout. This option
removes the typed command.
Options for COMMAND.COM or CMD.EXE.
Fullduplex, CR->CR+LF,Oem->ANSI, Use input buffer and Command line.
For standard applications, remove the Command line option.
Main points of interest in the source code
CRedirect class that can be used in any WIN32 or MFC applications. This class contains
four virtual functions for notification.
virtual void OnChildStarted(LPCSTR lpszCmdLine);
virtual void OnChildStdOutWrite(LPCSTR lpszOutput);
virtual void OnChildStdErrWrite(LPCSTR lpszOutput);
virtual void OnChildTerminate();
The main program is an MFC application that uses the
PostThreadMessage is used to post commands in a multithread environment.
WM_COPYDATA is used to post messages to the window.
The MFC print preview bug is not corrected!
Thanks to Paul DiLascia for some pieces of code from TraceWin.
Date Posted: Oct.17-2000