tags:

views:

136

answers:

4

There is an exe in system32 called edit.com . It is an old text editor. I'm wondering how they made a console app have a gui, and work with the mouse? Thanks

A: 

edit.com is REALLY old. It was written before the Windows GUI was really popular. They probably use special DOS functions to create the graphics and recognize the mouse.

Pace
A: 

Well prior to Windows 3.1 there used to be an operating system call DOS and I believe the mouse thing came with DOS 5.0 or DOS 4.0.

Raj
Mouse drivers could be used well before DOS 4.0 (I personally accessed one programmatically in DOS 3.3).
Joachim Sauer
good old times :)
Alexandru
A: 

Your best bet for adding mouse and color support to a console is to use some kind of TextArea control and make your own console instead of using the DOS console. You could also look into ncurses for Windows but I don't recommend it. If you just want color you could also look at this tutorial.

Pace
+3  A: 
Pessimist
Wow that sounded hard! Thanks for the info!
Milo
Wow ... looking up `int 33` leads to HTML copies of HELPPC. A tremendously useful TSR application that was a hyperlinked documentation system of the most common interrupts and other system-level stuff useful when writing that kind of code. A funny trip down the memory lane!
Joachim Sauer
Well, I wouldn't want to do it with a very good documentation by my side that I could reference. :) I'm new here so I don't know if we can share links, but if you search for "INT 33,1 Show Mouse Cursor" you'll find some reference material about all the functions and a bit about how they were used.
Pessimist
... and writing into the text video buffer via `B800:0000`. Back then, it was "fun".
ZoogieZork