size of the screen

This is a discussion on size of the screen within the C Programming forums, part of the General Programming Boards category; Is there a function to get the width of the command screen(the size of the screen buffer)? if yes what ...

  1. #1
     is offline
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
     is offline
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
     is offline
    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,059
    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, 12: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, 09:18 PM
  5. Console Screen Buffer
    By GaPe in forum Windows Programming
    Replies: 0
    Last Post: 02-06-2003, 04:15 AM

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