How do I add scrollbars to a DOS console C program? (with on screen output?)
How do I add scrollbars to a DOS console C program? (with on screen output?)
post any ideas or code you have. There might be a library somewhere that does scroll bars, but you can't just do them automatically.
How come some files come with a readme.com file (about a couple KB) and a readme.txt and clicking the .com file displays the txt file in dos, with scrollbars, how does it do that?
That is something DOS does on its own, maybe because it's opening a file. I don't think you can control whether or not it does it.
I don't think what he's talking about is just DOS Draco, but more likely a custom program written to display readme files (or a readme file). It is quite feasible to write a program that does this, you may want to look for some source for a simple DOS editor, it might give you some idea's.
Demonographic rhinology is not the only possible outcome, but why take the chance
The scroll bars come from the program, like Notepad, not from DOS. When the data does not fit within the window allotted (say 80 col by 25 lines) the program will add a scrollbar so you can get to the bottom of right side of the data window.
Are you programming true DOS (16 bit) or a console window (32 bit)? IOW, what's your OS?
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
windows
Check into the windows api's. They probably have the answer. That's not an area I'm all that familiar with.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
It appears that You want to have a scrolling effect in 16bit C++ Environment(DOS Console). Well I did it some 3-4 years earlier and do not remember exactly. But my suggestions are as follows:
1. If you want to make something like a Text Reader, then it is damn easy.
a. Simply create the necessary graphics that show the Scroll Bar.
b. Take a variable that accounts for the Current Line No, Top Line No, the Last Line No of the View.
c. Show the Text that is in between the Top Line No and the Last Line No.of the view. Obviously both Last Line No of the View < =Last Line of the Text File and the Top Line No >=First Line of the Text File.
By Simply incrementing and decrementing these values, u can easily create the Vertical Scrolling Effect.
Use a similar method 4 Horizontal Effect.
U may Contact me for any further assistance.
Bye
Arvind
[email protected]