Buffer Interaction

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vikram

    #1

    Buffer Interaction

    Hi,

    I would like to make a dos program which can directly
    interact with the buffer. I mean that there will be a loop
    which will constantly check the the buffer for any pressed
    key and if there was a key pressed then store it's value.
    I tried to use streambuf class but was unable to do so.

    Basically I have made a graphical clock(In Dos) and Dos
    does not have multithreading capability. So I want to
    press the 's' key to stop the clock or erase the clock and
    goto some other menu. The problem is that the clock is
    itself in a loop state so I have to put the check for
    pressed key in the loop. Now cin>> or cin.getline cannot
    be used as it will hault the loop until an input is given
    and I don't want the clock to stop. I think that this can
    only be done if you can directly access the buffer, which
    I'm unable to do.

    Please do help and if you have a method which does not
    require direct buffer accessing then please post it too.

    Thanks,
    Vikram.
  • Cor

    #2
    Re: Buffer Interaction

    Hi Vikram,

    Are you sure you asking this to the right newsgroup?
    Dotnet can not run on a Dos computer.
    I think you have a better change in a C++ newsgroup (I saw your previous
    message).

    Cor


    Comment

    • Guest's Avatar

      #3
      Re: Buffer Interaction

      Hi Cor,

      I posted this question because actually I was working with
      a Dos program on Visual Studio 6. So I thought that some
      other facility of Visual Studio might come into help.

      I will look for a C++ Newsgroup.

      Thanks,
      Vikram.
      [color=blue]
      >-----Original Message-----
      >Hi Vikram,
      >
      >Are you sure you asking this to the right newsgroup?
      >Dotnet can not run on a Dos computer.
      >I think you have a better change in a C++ newsgroup (I[/color]
      saw your previous[color=blue]
      >message).
      >
      >Cor
      >
      >
      >.
      >[/color]

      Comment

      • Vikram

        #4
        Buffer Interaction

        Hi,

        Can anyone tell me some good C++ Newsgroups...

        Thanks,
        Vikram.

        [color=blue]
        >-----Original Message-----
        >Hi,
        >
        >I would like to make a dos program which can directly
        >interact with the buffer. I mean that there will be a[/color]
        loop[color=blue]
        >which will constantly check the the buffer for any[/color]
        pressed[color=blue]
        >key and if there was a key pressed then store it's value.
        >I tried to use streambuf class but was unable to do so.
        >
        >Basically I have made a graphical clock(In Dos) and Dos
        >does not have multithreading capability. So I want to
        >press the 's' key to stop the clock or erase the clock[/color]
        and[color=blue]
        >goto some other menu. The problem is that the clock is
        >itself in a loop state so I have to put the check for
        >pressed key in the loop. Now cin>> or cin.getline cannot
        >be used as it will hault the loop until an input is given
        >and I don't want the clock to stop. I think that this can
        >only be done if you can directly access the buffer, which
        >I'm unable to do.
        >
        >Please do help and if you have a method which does not
        >require direct buffer accessing then please post it too.
        >
        >Thanks,
        >Vikram.
        >.
        >[/color]

        Comment

        • Matthew W. Jackson

          #5
          Re: Buffer Interaction

          Unless you're using Visual Studio 6 with a different C++ compiler than it
          comes with, then I don't think what you're actually making *IS* a DOS
          program. As far as I know, Visual Studio 6 only compiles 32-bit Windows
          programs. If you are writing a console program, then it is still a Windows
          program, and therefore it WILL support multi-threading. There are several
          Windows programs that look like DOS programs, like NET, IPCONFIG, START,
          etc. But I don't think they'll actually run in DOS.

          Remember, DOS isn't the only OS with a console. It's just an OS with ONLY a
          console.

          Now I've heard of DOS-extenders which can run a simple Win32 console program
          under DOS, but that's another story.

          --Matthew W. Jackson

          <anonymous@disc ussions.microso ft.com> wrote in message
          news:08f401c3cf b3$8f26b4c0$a50 1280a@phx.gbl.. .[color=blue]
          > Hi Cor,
          >
          > I posted this question because actually I was working with
          > a Dos program on Visual Studio 6. So I thought that some
          > other facility of Visual Studio might come into help.
          >
          > I will look for a C++ Newsgroup.
          >
          > Thanks,
          > Vikram.
          >[color=green]
          > >-----Original Message-----
          > >Hi Vikram,
          > >
          > >Are you sure you asking this to the right newsgroup?
          > >Dotnet can not run on a Dos computer.
          > >I think you have a better change in a C++ newsgroup (I[/color]
          > saw your previous[color=green]
          > >message).
          > >
          > >Cor
          > >
          > >
          > >.
          > >[/color][/color]


          Comment

          Working...