Thread: GetConsoleScreenBufferInfo

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

    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);
    Using Windows 10 with Code Blocks and MingW.

  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
    932
    Yes thanks Valaris, i guess thats what i should use.
    Using Windows 10 with Code Blocks and MingW.

Popular pages Recent additions subscribe to a feed