Question on Consoles

This is a discussion on Question on Consoles within the C++ Programming forums, part of the General Programming Boards category; I am looking at changing font sizes on a console screen and have found these functions Code: GetConsoleFontSize GetCurrentConsoleFont GetCurrentConsoleFont ...

  1. #1
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174

    Question on Consoles

    I am looking at changing font sizes on a console screen and have found these functions
    MSDN says that the only library neede is Kernel32, which I have linked to, but I still get an error
    Code:
    'GetConsoleFontSize': identifier not found, even with argument-dependent lookup
    MSDN also says that the EX versions only work on Vista, which I don't have.

    Two questions here,
    1) What am I missing here to make the functions work properly?
    2) If the EX versions do require Vista, how can I set the font size as the only function I can find is the EX version?
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  2. #2
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Location
    Hampton, VA
    Posts
    391
    Are you including Windows.h?

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    And you've got XP or later,right?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174
    Yes and Yes.
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  5. #5
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Location
    Hampton, VA
    Posts
    391
    hrmmmm. that's a head scratcher then. unfortunately on I'm laptop (only Linux) so I can't try to run any of my old window apps to go through it for you. sorry.

  6. #6
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Quote Originally Posted by Dark_Phoenix View Post
    MSDN says that the only library neede is Kernel32, which I have linked to, but I still get an error
    Code:
    'GetConsoleFontSize': identifier not found, even with argument-dependent lookup
    This is no linker error. Let the preprocessor run and then check, if the functions you use are declared inside the preprocessed compilation unit. Are They?

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by The F Manual
    To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers.
    Reading. It's difficult.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174
    Quote Originally Posted by CornedBee View Post
    Reading. It's difficult.
    I did that already (yes, I did read it) but no results.
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  9. #9
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174
    OK, Nevermind... I did the define after I included windows instead of before... DUHH!

    OK, On to question #2. How can I change the font size? The only function I have been able to find is SetCurrentConsoleFontEx, which requires Vista, I am running XP.
    Last edited by Dark_Phoenix; 02-03-2008 at 06:06 PM.
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

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