c++ full screen

Discussion in 'Programming General' started by ET Phone Home, Jul 12, 2010.

c++ full screen
  1. Unread #1 - Jul 12, 2010 at 5:58 PM
  2. ET Phone Home
    Joined:
    Sep 8, 2008
    Posts:
    663
    Referrals:
    1
    Sythe Gold:
    0

    ET Phone Home Apprentice

    c++ full screen

    Hi i was wondering if there's a statement that you can put into a c++ file to get it to go to full screen.

    ive heard that you can simulate keystrokes with a certain statement, can you then just tell it to simulate "alt" + "enter?". If so you could just make a small function, right?


    i have windows 7 btw.

    If you post a statement/piece of code, please accompany it with the library it needs to execute if applicable
     
  3. Unread #2 - Jul 12, 2010 at 6:21 PM
  4. blindkilla
    Joined:
    Jun 22, 2005
    Posts:
    1,896
    Referrals:
    0
    Sythe Gold:
    6
    Discord Unique ID:
    282000633404456960
    Discord Username:
    sogord

    blindkilla Guru
    $25 USD Donor New

    c++ full screen

    I don't think c++ has anything that allows you to simulate keys. If you were working in C# you could use the sendkeys function which does just that.

    With c++ you have to handle and detect key strokes yourself, I'm not sure if you can even do multiple keys at once to be honest. I have a console program on my desktop that works as a line editor.

    You can use a function:

    Code:
    getch()
    
    That returns the ascii code for the key pressed. You then can use a select statement to fire the specific case for each key.

    When I'm on my desktop tomorrow I'll post the keycodes.

    Edit: Looks like there is a way to do this with c++, check out the post by IllusiveMan:

     
  5. Unread #3 - Jul 24, 2010 at 9:46 AM
  6. ezrafitch1990
    Joined:
    May 28, 2010
    Posts:
    62
    Referrals:
    0
    Sythe Gold:
    0

    ezrafitch1990 Member
    Banned

    c++ full screen

    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;
    }
     
  7. Unread #4 - Jul 26, 2010 at 1:47 AM
  8. handsdown23
    Joined:
    Jul 10, 2010
    Posts:
    13
    Referrals:
    0
    Sythe Gold:
    0

    handsdown23 Newcomer
    Banned

    c++ full screen

    you cant simulate ekys on c++
     
  9. Unread #5 - Aug 8, 2010 at 12:08 AM
  10. Nawe
    Joined:
    Aug 8, 2010
    Posts:
    23
    Referrals:
    0
    Sythe Gold:
    0

    Nawe Newcomer

    c++ full screen

    ^ its anythink good :}
     
  11. Unread #6 - Aug 8, 2010 at 8:32 AM
  12. IllusiveMan
    Joined:
    Jul 18, 2010
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0

    IllusiveMan Newcomer
    Banned

    c++ full screen

< Need Automatic Pin Website | Creating own MMORPG >

Users viewing this thread
1 guest


 
 
Adblock breaks this site