|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: screen clear
============================================================ Get a better night's sleep tonight knowing that your email subscriptions are busy filing and sorting themselves. So they'll be just where you need them to be in the morning. http://click.topica.com/aaabDobUrGczbU68iFa/register ============================================================ At 04:48 PM 3/22/01 -0800, you wrote: >hi everyone, > > >i'm working on a dos program, and i wondering how to clear the screen and >put text at different places? > >basically i want to have some text on the top 90% of the screen, and have >some options on the bottom 10. when a person makes a selection, the >screen is cleared and other text is on the top 90% and options on the >bottom 10, and so on. i would think this wouldn't be that difficult, but >i'm very curious to know, thanks for any help. > >russ I felt the same way when i met DOS - like, "where's the i/o?" There was a nsg bag called VANSII that gave u addressable text, but i had trouble with it every new DOS rev. Sounds like u want a screen handler. I just happen to have one - basically i got tired of writing the same HI code over'n'over for every DOS prog. Here's the pitch - U get a program called EDMEN and a library called TXLIB and MENULIB. U use EDMEN to design ur screens. It supports the 16 standard colors, whatever font DOS believes in at the moment, and the linedrawing characters. It takes a little getting used to, the controls are pre-DOS, but it has a help screen, and me on email support. IIRC it also supports a special char set with extra large (2x2 cell) characters. It also supports input fields - ASCII, single character, binary, int*16 and float*32. It has limited editing - like numeric range checks, and single characters from a list, like Y/N answers, and casefolding. U set up the fields on the menu, and point them to 3 arrays in ur program, for text, int and float. It also has multiple screens - ur app can throw any screen up, by number. Then when ur app runs, u init the menu (by menu file name) on startup, and when u want to talk to the user, just call RUN_MENU(params), and the library takes care of things. I.e. it draws the screen, gets the user inputs, range-checks them, and handles all that pi$$y stuff like backspace and echoing and casefolding and decimal points and alpha in a num field. The next thing ur app knows, with that one call, u've got all the users responses at the expected place in the "destination array" u allocated to the library's use. Ur app has only got to know which screen to call, and where to expect the answers. And, if u want to change the screen slightly, like move a field or change colors or add instructions, (not add a new field), u just run EDMEN and open the menu file and edit it, and ur app never has to know. All the screen info is in the menu file. (This is how Windoze could have been done, but that's another matter ;) The library also has lower-level modules that clear screen or line, change colors, put text/numbers on etc if u want to do them urself. I think a later ver evenlets u redefine the 16 std colors. A few warnings: The library does direct screen access, that is, it writes to memory at B800. This is fine by DOS and faster than stink, seems to work in W98, but some versions of W95 choke up, u have to reboot in DOS mode. This is not current, releaseable code. I last used it last month for a little scifi applet, but i have a few versions kickin' around, it may take a few tries to get u a functional set. I'll work with u if u want to try this. The good news is, once u get used to it, u can write a DOS app in an hour or so, and instead of 80% of ur code being get-ready and 20% being actual app, the ratio changes to about 30% get-ready and 70% app. (This ratio is one that the s/ware dev industry seems to have largely abandoned, to its great detriment IMHO.) Anyhew, lemme know if u wanna give this a try, i'll send u the stuff (specify what compiler u use in DOS). I didn't know there were any other DOS coders out there :) grant ____________________________________________________________ T O P I C A -- Learn More. Surf Less. Newsletters, Tips and Discussions on Topics You Choose. http://www.topica.com/partner/tag01
|
|