Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #ifndef LIB_CONSOLE
- #define LIB_CONSOLE
- #include <windows.h>
- // Define algumas constantes de cores
- #define FOREGROUND_DEFAULT (FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY) // White
- #define BACKGROUND_DEFAULT (BACKGROUND_GREEN & BACKGROUND_RED & BACKGROUND_BLUE | FOREGROUND_DEFAULT) // Black
- #define BACKGROUND_WHITE (BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED)
- class Console
- {
- private:
- HANDLE hConsole;
- char *message;
- public:
- // Construtor e destrutor da classe
- Console();
- ~Console();
- // Funcoes p/ movimentar o cursor no console
- bool gotoxy( int x, int y );
- bool previousLine();
- COORD getCursorPosition();
- // Funcoes diversas para a manipulacao do console
- bool setColor( WORD cor );
- bool setTitle( LPCSTR titulo );
- bool mode( int x, int y );
- void delay( DWORD tempo );
- bool cls( int x, int y );
- bool cls();
- bool setConsole(DWORD consoleID);
- LPSTR getMessageError();
- void close();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement