views:

33

answers:

2

I need a terminal Widget which is able to emulate a windows console and a simple VT100 terminal on Windows. Something like VTE for GTK or QConsole for QT.

Is it even possible to run a Windows Console like cmd.exe inside a child window?

+1  A: 

Usually a "console" or Terminal hooks up at a rs-232 interface. cmd.exe is AFAIK a native application only acting like a command line interpreter. Therefor you will not be able to use it in an child window.

Do you need a terminal emulator that communicates with a VT100? If so, there are tons of out there. If you want to write your own Interface take a look at the Windows PowerShell API. Another great Open Source Project for achieving something you want is PuTTY for Windows under MIT License. You could communicate with the VT100 using Telnet. The Windows Telnet client should be accessible using PowerShell.

thatsdisgusting
PuTTY source code is unfortunately terrible complex. But yes this is exactly what i want. Just without all the encrypting stuff and as an embeddable component. The GUI stuff in PuTTY is totally hardwired with the rest of the program.
Lothar
+1  A: 

Just call AllocConsole to create your own console window. You can use the normal console mode CRT functions to read and write from/to it. A more GUI friendly approach would be to just create a window with a multi-line readonly Edit control with a fixed-pitch font.

Hans Passant
But there is much more, called Escape Sequences, i couldn't find any documentation about them (The unix VT100 etc. are all nicely documented). Even getting the Echo mode for multiplexed input/output correct is not easy.
Lothar
Well, it would be your job to implement them. It certainly has been done before, a quick google turned up http://sourceforge.net/projects/rote/
Hans Passant