Thread: size of the screen

  1. #1
    ex-samurai §áßø†æ™'s Avatar
    Join Date
    Nov 2006
    Location
    England
    Posts
    18

    size of the screen

    Is there a function to get the width of the command screen(the size of the screen buffer)?
    if yes what is it?thx in advanced
    Code:
    int val=0; while(val==0) printf("\a");

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    You need to say which OS and compiler you're using.

    Standard C knows nothing of such things.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    ex-samurai §áßø†æ™'s Avatar
    Join Date
    Nov 2006
    Location
    England
    Posts
    18
    windows, MVS.net 2003

    cos I have this function that aligns text to the centre, but I need to know the size of the screen buffer of the user.
    Code:
    int val=0; while(val==0) printf("\a");

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    http://faq.cprogramming.com/cgi-bin/...&id=1043284392
    Not the answer, but if you go look up those functions on http://msdn.microsoft.com, then you'll find what you're looking for.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    ex-samurai §áßø†æ™'s Avatar
    Join Date
    Nov 2006
    Location
    England
    Posts
    18
    OK cheers
    Code:
    int val=0; while(val==0) printf("\a");

  6. #6
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    I would suggest you narrow your seach to GetConsoleScreenBufferInfo.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. char Handling, probably typical newbie stuff
    By Neolyth in forum C Programming
    Replies: 16
    Last Post: 06-21-2009, 04:05 AM
  2. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  3. Render text
    By Livijn in forum C++ Programming
    Replies: 6
    Last Post: 07-06-2007, 03:32 PM
  4. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  5. Console Screen Buffer
    By GaPe in forum Windows Programming
    Replies: 0
    Last Post: 02-06-2003, 05:15 AM