Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ames!haven.umd.edu!uflorida!SORROW@MAPLE.CIRCA.UFL.EDU From: sorrow@oak.circa.ufl.edu Newsgroups: comp.os.msdos.programmer Subject: Re: Text windowing/UI techniques Message-ID: <00949D12.08C6DE40@MAPLE.CIRCA.UFL.EDU> Date: 8 Jun 91 16:08:53 GMT References: Sender: news@uflorida.cis.ufl.EDU Reply-To: sorrow@oak.circa.ufl.edu Distribution: na Organization: University of Florida CIRCA VAX Cluster Lines: 48 I personally would use the Al Stevens library since it is PD. Also, when he gets done with it I am sure that it will just about dog most commercial products. I just finished writing my own library that compiles to about 75K all together. It looks exactly like the Borland IDE. However, I found that writing my own was a bigger pain than it's worth. PC Week stated that Borland would be releasing TurboVision for C++ sometime soon. If so, I would get that package. Some general rules that I abide by are: 1. Always use direct screen writes and reads (don't worry about snow...most people have either Herc or VGA these days). 2. Install your own interrupt handler for the mouse, but unless you want some serious pain avoid the keyboard handler. In my GetEvent function I have something like this: if (Queue.NumEvents) { // Grab an event } else if kbhit() { // Grab the key and translate it } 3. User the BIOS functios to scroll windows vertically. 4. If you use the conio routines for Borland, use window() and cputs() since they do automatic truncation/scrolling. 5. Get the Logitech Mouse Programmer's Reference...an invaluable guide for moues programming (such as installing your own call back function). 6. Read the Al Stevens column closely and use as much as possible. The man knows what he is doing. Also, since I'm kind of a wimp when it comes to difficult programming, I statically allocate all my windows in a header file. This avoids the problem of knowing what memory is valid for freeing, constantly checking for out of memory problems, pointer problems, etc. Dynamically allocate the scroll back buffer for every window, and dynamically allocate all the screen buffers when the window is opened. Hope this helps, Brian /* Brian Hook -- MS-DOS Programmer for Contract ----------------------------------------------------------------- "I was in the kitchen, Seamus, that's my dog, was outside....and buried ALIVE....fritter and waste...but this one goes to 11!....anymore of that plutonium nyborg?...Little guitars..This is home...this is Mean Street.. */