Thread: How to make a Console Window fullscreen

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    6

    How to make a Console Window fullscreen

    Hey, I was wondering if their is anyway to make it so that a Normal C++ console window would auto-matically be in Full screen Mode?

    ~ herocks

  2. #2
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    SetConsoleWindowInfo() with GetLargestConsoleWindowSize() . Assuming you're using windows.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  3. #3
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174
    It's plateform specific, but look at http://www.adrianxw.dk/SoftwareSite/index.html
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  4. #4
    Registered User
    Join Date
    Jan 2007
    Posts
    6
    Could someone just give me an example of it that just dose that?

  5. #5
    Registered User
    Join Date
    Jan 2007
    Posts
    38
    I dont think you can make it fullscreen in windows... acually you can but the text size will be much larger also.

  6. #6
    Registered User asbo60's Avatar
    Join Date
    Jan 2006
    Posts
    38
    Just press Alt+tab or run a program to do that for you automatically

    Heres the Program


    Code:
    void AltEnter()
    {
        keybd_event(VK_MENU,
                    0x38,
                    0,
                    0);
        keybd_event(VK_RETURN,
                    0x1c,
                    0,
                    0);
        keybd_event(VK_RETURN,
                    0x1c,
                    KEYEVENTF_KEYUP,
                    0);
        keybd_event(VK_MENU,
                    0x38,
                    KEYEVENTF_KEYUP,
                    0);
        return;
    }
    hope that helps
    Come give my Website a visit and try my new program, all you gamers will love it!
    www.AzA-Productions.com
    Click on applications and download Key Control!

    Also I have tons of extra space available so, if you have a project or application you want the world to see just give me an email at [email protected] and ill see what i can do for you.

    Asbo60

  7. #7
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Your compiler also needs windows.h as a stored library header
    Double Helix STL

  8. #8
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by asbo60 View Post
    Just press Alt+tab or run a program to do that for you automatically

    Heres the Program


    Code:
    void AltEnter()
    {
        keybd_event(VK_MENU,
                    0x38,
                    0,
                    0);
        keybd_event(VK_RETURN,
                    0x1c,
                    0,
                    0);
        keybd_event(VK_RETURN,
                    0x1c,
                    KEYEVENTF_KEYUP,
                    0);
        keybd_event(VK_MENU,
                    0x38,
                    KEYEVENTF_KEYUP,
                    0);
        return;
    }
    hope that helps
    Your assuming the user has got Alt+TAB set to do that.

    Emulating key-presses is no way to work around the API.

  9. #9
    Lean Mean Coding Machine KONI's Avatar
    Join Date
    Mar 2007
    Location
    Luxembourg, Europe
    Posts
    444
    Quote Originally Posted by zacs7 View Post
    Your assuming the user has got Alt+TAB set to do that.

    Emulating key-presses is no way to work around the API.
    It's Alt+Enter, not Alt+Tab.

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by KONI View Post
    It's Alt+Enter, not Alt+Tab.
    Didn't say it was Alt+Tab, I'm just quoting asbo60

  11. #11
    0x01
    Join Date
    Sep 2001
    Posts
    88
    http://msdn2.microsoft.com/en-us/library/ms686028.aspx
    Code:
    BOOL WINAPI SetConsoleDisplayMode(
      HANDLE hConsoleOutput,
      DWORD dwFlags,
      PCOORD lpNewScreenBufferDimensions
    );

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. Make My Window Invisible for a Split Second
    By Brad0407 in forum Windows Programming
    Replies: 9
    Last Post: 04-10-2007, 05:58 PM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. Adding colour & bmps to a Win 32 Window??
    By carey_sizer in forum Windows Programming
    Replies: 4
    Last Post: 09-04-2004, 05:55 PM
  5. how to make 2 text window
    By bluexrogue in forum C Programming
    Replies: 2
    Last Post: 09-15-2001, 08:51 PM