Thread: ScrollBars

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    104

    ScrollBars

    How do I add scrollbars to a DOS console C program? (with on screen output?)

  2. #2
    Registered User Draco's Avatar
    Join Date
    Apr 2002
    Posts
    463
    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.

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    104
    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?

  4. #4
    Registered User Draco's Avatar
    Join Date
    Apr 2002
    Posts
    463
    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.

  5. #5
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    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

  6. #6
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    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

  7. #7
    Registered User
    Join Date
    Oct 2003
    Posts
    104
    windows

  8. #8
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    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

  9. #9
    Registered User
    Join Date
    Sep 2003
    Posts
    4

    Cool Scroll Bars In C

    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]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to remove Scrollbars from a C# Console App?
    By Gingerage in forum C# Programming
    Replies: 1
    Last Post: 09-26-2008, 03:50 AM
  2. Scrollbars in dialog
    By Frandy in forum Windows Programming
    Replies: 7
    Last Post: 02-16-2005, 01:35 AM
  3. winxp style scrollbars.
    By Benzakhar in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2003, 04:16 PM
  4. Scrollbars
    By SOS in forum Windows Programming
    Replies: 2
    Last Post: 08-16-2002, 04:21 PM
  5. Edit box with automatic scrollbars?
    By SMurf in forum Windows Programming
    Replies: 3
    Last Post: 04-04-2002, 11:24 PM