How to initialize screen size and screen buffer size?

This is a discussion on How to initialize screen size and screen buffer size? within the Windows Programming forums, part of the Platform Specific Boards category; How can I initialize the screen size and screen buffer size each time I run the program?...

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

    How to initialize screen size and screen buffer size?

    Name:  C.jpg
Views: 460
Size:  38.8 KB

    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 Name:  verde.gif
Views: 393
Size:  349 Bytes:


    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 Name:  smiled.gif
Views: 385
Size:  176 Bytes.

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, 11:35 PM

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