Thread: How to set win32 console back to the first line?

  1. #1
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283

    How to set win32 console back to the first line?

    I want to display output in my console and yet set it back to the top afterwards. The thing is I don't want to set the cursor to (0,0). I just want the console to go there and leave the cursor where it is. Is there a way of doing this (basically setting the scrollbar back to the top)?

  2. #2
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  3. #3
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    Please read the question more carefully.
    Last edited by dxfoo; 03-08-2008 at 10:32 AM.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252
    Max was trying to help; you should probably rephrase your question instead of asking someone to guess at the discrepancy between the supplied answer vs. the question.

    Have you checked out set cursor position?

  5. #5
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    Please read the question more carefully too

    I'll break it down (just repeating what I said):

    I do not want to clear anything - This is why I mentioned I will be outputting text.
    I do not want to move the cursor back to the top - I mentioned this too.
    I want the scrollbar to move back to the top - Mentioned this too.

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,794
    Try SetConsoleWindowInfo function
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  7. #7
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    Alright, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Win32 console, xp,nt,2000 only?
    By Ash1981 in forum C Programming
    Replies: 8
    Last Post: 01-01-2006, 03:09 AM
  2. making a stealthy win32 console application?
    By killdragon in forum C++ Programming
    Replies: 3
    Last Post: 09-08-2004, 02:50 PM
  3. Win32 Console Application...Full Screen?
    By MrWizard in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2002, 02:56 PM
  4. win32 apps compiled with GCC start console window!
    By Citrus538 in forum Windows Programming
    Replies: 5
    Last Post: 02-18-2002, 10:35 PM
  5. Greenhand want help!
    By leereg in forum C Programming
    Replies: 6
    Last Post: 01-29-2002, 06:04 AM