Thread: How to initialize screen size and screen buffer size?

  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    127

    How to initialize screen size and screen buffer size?

    How to initialize screen size and screen buffer size?-c-jpg

    How can I initialize the screen size and screen buffer size each time I run the program?

  2. #2
    Registered User
    Join Date
    Jul 2012
    Posts
    8
    That can be done with the usage of SetConsoleScreenBufferSize and SetConsoleWindowInfo when the program starts How to initialize screen size and screen buffer size?-verde-gif:


    Code:
    #include <stdio.h>
    #include <windows.h>
    
    
    
    int main(void)
    {
        HANDLE Output = GetStdHandle(STD_OUTPUT_HANDLE);
        COORD Coordinates = {200, 100};
        SetConsoleScreenBufferSize(Output, Coordinates);
        SMALL_RECT Coordinates2 = {10, 20, 60, 50};
        SetConsoleWindowInfo(Output, TRUE, &Coordinates2);
        getchar();
        return 0;
    }


    I hope that I have helped How to initialize screen size and screen buffer size?-smiled-gif.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console screen size
    By harry_p in forum C++ Programming
    Replies: 10
    Last Post: 12-01-2010, 04:46 PM
  2. size of the screen
    By §áßø†æ™ in forum C Programming
    Replies: 5
    Last Post: 12-10-2006, 04:36 PM
  3. Colour and Screen Size
    By djlethal in forum C Programming
    Replies: 1
    Last Post: 11-24-2006, 09:29 PM
  4. Largest screen buffer size?
    By Ash1981 in forum C Programming
    Replies: 2
    Last Post: 01-30-2006, 04:31 AM
  5. Changing size of dos screen
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 04-26-2002, 10:35 PM