Thread: for a friend

  1. #1
    Registered User Ajsan's Avatar
    Join Date
    Dec 2003
    Posts
    55

    for a friend

    this code is for people in my c++ class


    Code:
    #include <windows.h>
    
    void fullscreen()
    {
    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);
    }
    
    void clrscr()
    {
        COORD                       coordScreen = { 0, 0 };
        DWORD                       cCharsWritten;
        CONSOLE_SCREEN_BUFFER_INFO  csbi;
        DWORD                       dwConSize;
        HANDLE                      hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
        GetConsoleScreenBufferInfo(hConsole, &csbi);
        dwConSize = csbi.dwSize.X * csbi.dwSize.Y;
        FillConsoleOutputCharacter(hConsole, TEXT(' '), 
                                   dwConSize, coordScreen, &cCharsWritten);
        GetConsoleScreenBufferInfo(hConsole, &csbi);
        FillConsoleOutputAttribute(hConsole, csbi.wAttributes, 
                                   dwConSize, coordScreen, &cCharsWritten);
        SetConsoleCursorPosition(hConsole, coordScreen);
    }
    
    void pos( int X, int Y)
    {
         HANDLE OutputH;
         COORD position = {X, Y};
         OutputH = GetStdHandle(STD_OUTPUT_HANDLE);
         SetConsoleCursorPosition(OutputH, position);
    }
    
    
    //colors
    
    OutputH = GetStdHandle(STD_OUTPUT_HANDLE);
     SetConsoleTextAttribute(OutputH, /*Color Here*/);
    Style is overrated.

    - —₽‚¢‰Î -

  2. #2
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Don't post it here. Find a better place to give it to your friend.
    Do not make direct eye contact with me.

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    is it really that big of a deal?
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  4. #4
    Registered User Ajsan's Avatar
    Join Date
    Dec 2003
    Posts
    55
    i didn't think that it was cause it might be useful to other people.

    sry.
    Style is overrated.

    - —₽‚¢‰Î -

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Most of that stuff is in the FAQ anyway

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Friend cannot inherit from private subclass
    By MWAAAHAAA in forum C++ Programming
    Replies: 4
    Last Post: 11-19-2006, 04:44 PM
  2. arithmetic operator friend functions
    By linucksrox in forum C++ Programming
    Replies: 7
    Last Post: 02-06-2006, 11:39 PM
  3. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM
  4. friend function and friend classes...usage question??
    By actionbasti in forum C++ Programming
    Replies: 2
    Last Post: 10-30-2003, 10:53 PM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM