Thread: help for COLOR and GOTO function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    15

    help for COLOR and GOTO function

    Guys, good day.
    i got this code and it runs but i didn't gets its syntax.
    anyone have an explanation or data about this?
    thanks.
    i am using bloodshed dev c++ compiler
    you are very much appreciated.


    Code:
    void color(int colorNum)
    {
             //colors
             HANDLE  hConsole; 
             hConsole = GetStdHandle(STD_OUTPUT_HANDLE); 
             SetConsoleTextAttribute(hConsole, colorNum);
             //colors
    }
    
    void gotoxy(int x, int y)
    {
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
    }
    Last edited by jerico; 03-09-2011 at 06:28 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling C in Visual Studio 2005
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-16-2009, 04:25 AM
  2. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  3. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM

Tags for this Thread