home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Binary_Bot54213292002.psc / VLBot / ConsoleOutput.h < prev   
Encoding:
C/C++ Source or Header  |  2001-05-01  |  957 b   |  44 lines

  1. #ifndef CONSOLEOUTPUT_H
  2. #define CONSOLEOUTPUT_H
  3.  
  4. #include <windows.h>
  5. #include <stdio.h>
  6.  
  7. class ConsoleOutput {
  8. public:
  9.     ConsoleOutput(CRITICAL_SECTION *_Synchronize, bool createscreenbuffer = false, const char *_log = 0);
  10.     ~ConsoleOutput();
  11.     DWORD WriteEx(char color, const char *format, ...);
  12.     void SetTitle(const char *title);
  13.     char *GetTitle(char *buffer, DWORD size = 1024);
  14.     void Activate(void);
  15.     HWND GetWindow(void);
  16.     void SetLog(const char *_log);
  17.     enum {
  18.         WHITE = 0,
  19.         GRAY = 1,
  20.         BLUE = 2,
  21.         GREEN = 3,
  22.         RED = 4,
  23.         YELLOW = 5,
  24.         PURPLE = 6,
  25.         BLUEGREEN = 7,
  26.         MIDBLUE = 8,
  27.         DARKBLUE = 9,
  28.         DARKGREEN = 10,
  29.         DARKYELLOW = 11,
  30.         DARKRED = 12,
  31.         DARKPURPLE = 13
  32.     };
  33. private:
  34.     DWORD Write(const char *format, va_list argptr);
  35.     void WriteLog(const char *format, va_list argptr);
  36.     void SetColor(char color);
  37.     HANDLE output;
  38.     CRITICAL_SECTION *Synchronize;
  39.     bool createdscreenbuffer;
  40.     char *log;
  41. };
  42.  
  43. #endif
  44.