Thread: Disable scrolling?

  1. #1
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379

    Disable scrolling?

    I'm making a pritty short game, but the console keeps auto-scrolling down. The othe thing is that its turned based, so users can scroll down at will. Is there any way to disable this scrolling?

    (WinXP Borland C++ Free Command Line Compiler)

    [Edit] To avoid making two posts, does anyone know how to get text from a particular line, or all text in the console currently?

    Thank you in advance.
    Last edited by Blackroot; 01-08-2006 at 11:42 PM.
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  2. #2
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    Well, I'm still working on my console game, but its save funcion is messed up. It should write the visible map to a file, but when it writes it, it doesnt write it like what the map looks like.

    Only problem is that there are two squares that always come up at the very start of the writing... I cant figure out why?

    Anyone?

    Code:
    void Save() { 
     COORD Pos;
     HANDLE hOt = GetStdHandle(STD_OUTPUT_HANDLE);
     DWORD reader;
     char buffer[2027];
     char DELO[1];
     int x_pos, y_pos;
     SHORT bc;
    
     ofstream file_out(MAINPATHNAME);
     if(!file_out) {
      clrscr();
      cout << "Unable to open file!";
      }
     for(y_pos=0; y_pos <= 24; y_pos++)
      for(x_pos=0; x_pos <= 80; x_pos++){
       bc++;
       Pos.X = x_pos;
       Pos.Y = y_pos;
       ReadConsoleOutputCharacter(hOt, &DELO[0], 1, Pos, &reader);
       if(x_pos == 80) {
        buffer[bc] = 'W';
      } else 
       buffer[bc] = DELO[0];
     }
     for(bc=0; bc < 2027; bc++) {
      if(buffer[bc] == 'W')
       file_out << endl;
      else
       file_out << buffer[bc];
     }
     file_out.close();
     clrscr();
     exit(0);
    }
    Last edited by Blackroot; 01-08-2006 at 11:55 PM.
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Disable specific warning?
    By DrSnuggles in forum C++ Programming
    Replies: 8
    Last Post: 05-07-2009, 10:45 PM
  2. Disable ALT key commands
    By Lionmane in forum Windows Programming
    Replies: 9
    Last Post: 09-23-2005, 10:41 AM
  3. Scrolling background?
    By Deo in forum Game Programming
    Replies: 6
    Last Post: 06-09-2005, 05:40 PM
  4. Scrolling
    By PJYelton in forum Windows Programming
    Replies: 10
    Last Post: 03-24-2003, 10:04 AM
  5. Bitmap scrolling with scroll bars
    By solar3147 in forum Windows Programming
    Replies: 0
    Last Post: 03-17-2003, 02:39 AM