How to set win32 console back to the first line?

This is a discussion on How to set win32 console back to the first line? within the Windows Programming forums, part of the Platform Specific Boards category; I want to display output in my console and yet set it back to the top afterwards. The thing is ...

  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 09: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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    Try SetConsoleWindowInfo function
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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, 02: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, 01:56 PM
  4. win32 apps compiled with GCC start console window!
    By Citrus538 in forum Windows Programming
    Replies: 5
    Last Post: 02-18-2002, 09:35 PM
  5. Greenhand want help!
    By leereg in forum C Programming
    Replies: 6
    Last Post: 01-29-2002, 05:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21