Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7057709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:01:17+00:00 2026-05-28T04:01:17+00:00

at the beginning I have: #include <sstream> #include <iostream> #include <stdio.h> #include <iomanip> #include

  • 0

at the beginning I have:

#include <sstream>
#include <iostream>
#include <stdio.h>
#include <iomanip>
#include <string>
#define _WIN32_WINNT 0x500 //tells that this is win 2000 or higher, without GetConsoleWindow would not work
#include <windows.h>

using namespace std;

int main() {
  PCONSOLE_FONT_INFO lpConsoleCurrentFont;
  GetCurrentConsoleFont(GetStdHandle(STD_OUTPUT_HANDLE), false,  lpConsoleCurrentFont);
  return 0;
}

And undocumented function SetConsoleFont works, but GetCurrentConsoleFont fails at compilation saying that it was not declared in this scope.

— edit: changed to self sustained code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:01:17+00:00Added an answer on May 28, 2026 at 4:01 am

    GetCurrentConsoleFont is exported on NT4+ at least, the MinGW headers must be wrong.

    Try adding this code after your #include’s:

    #ifdef __cplusplus
    extern "C" {
    #endif
    BOOL WINAPI GetCurrentConsoleFont(HANDLE hConsoleOutput,BOOL bMaximumWindow,PCONSOLE_FONT_INFO lpConsoleCurrentFont);
    #ifdef __cplusplus
    }
    #endif
    

    Your code is also wrong, it should be:

    CONSOLE_FONT_INFO ConsoleFontInfo;
    GetCurrentConsoleFont(GetStdHandle(STD_OUTPUT_HANDLE), false,  &ConsoleFontInfo);
    

    (Any time you see PSOMETYPE as a parameter you usually allocate a SOMETYPE struct on the stack and pass a pointer to this struct as the parameter)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is sample program from Beginning Linux Programming book: #include <stdio.h> #include <term.h> #include
I have a .h file with this in it: #ifndef CS240_LINKED_LIST_H #define CS240_LINKED_LIST_H #include
strip_tags only catches tags that have a beginning and end tag. With the strings
I have spent too much time on this problem and am beginning to think
We have a database app that we're beginning to write some new systems for
I have a multipart form that takes basic user information at the beginning with
At the beginning of a makefile I have this line : PATH := $(PATH):/other/dir
I have a include statement that returns an echo to the browser of a
I have a simple C++ program: #include <iostream> int main() { std::cout << "Hello\n";
I have the following script that will update the connection string across three different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.