home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / console / console.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  1.3 KB  |  31 lines

  1.  
  2. /******************************************************************************\
  3. *       This is a part of the Microsoft Source Code Samples. 
  4. *       Copyright (C) 1993-1997 Microsoft Corporation.
  5. *       All rights reserved. 
  6. *       This source code is only intended as a supplement to 
  7. *       Microsoft Development Tools and/or WinHelp documentation.
  8. *       See these sources for detailed information regarding the 
  9. *       Microsoft samples programs.
  10. \******************************************************************************/
  11.  
  12. #define BACKGROUND_WHITE  (WORD) 0x00f0
  13. #define BACKGROUND_CYAN   (WORD) 0x0030
  14. #define FOREGROUND_YELLOW (WORD) 0x0006
  15. #define FOREGROUND_CYAN   (WORD) 0x0003
  16. #define FOREGROUND_WHITE  (WORD) 0x0007
  17.  
  18. #define PERR(bSuccess, api) {if (!(bSuccess)) perr(__FILE__, __LINE__, \
  19.     api, GetLastError());}
  20.  
  21. /* function prototypes */
  22. extern int myPuts(HANDLE hConsole, char *s);
  23. extern void showConAPIs(HANDLE hConsole);
  24. extern void putStatusLine(HANDLE hOut, char *buf);
  25. extern void perr(char *szFileName, int line, char *szApiName, DWORD dwError);
  26. extern void cls(HANDLE hConsole);
  27. extern char myGetchar(void);
  28. extern void setConTitle(char *szTitle);
  29. extern SHORT getConX(HANDLE hCon);
  30. extern SHORT getConY(HANDLE hCon);
  31.