GetConsoleScreenBufferInfo

This is a discussion on GetConsoleScreenBufferInfo within the Windows Programming forums, part of the Platform Specific Boards category; I dont understand why would it give 80 for X and 300 for Y when its the other way around. ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    812

    GetConsoleScreenBufferInfo

    I dont understand why would it give 80 for X and 300 for Y when its the other way around.

    When you open a console the width is larger than its height.

    Code:
        CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
        HANDLE hConsoleOut = GetStdHandle( STD_OUTPUT_HANDLE );
        GetConsoleScreenBufferInfo( hConsoleOut, &csbiInfo );
        printf("%i\n",csbiInfo.dwSize.X);
        printf("%i\n\n",csbiInfo.dwSize.Y);
    Compiler MSVC++ 2013 with Code::Blocks.

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    Try using the srWindow member. CONSOLE_SCREEN_BUFFER_INFO Structure (Windows)

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    812
    Yes thanks Valaris, i guess thats what i should use.
    Compiler MSVC++ 2013 with Code::Blocks.

Popular pages Recent additions subscribe to a feed

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