home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / directx / duel / duel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-15  |  1.9 KB  |  86 lines

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
  4.  *
  5.  *  File:    duel.h
  6.  *  Content:    main include file
  7.  *
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef DUEL_INCLUDED
  12. #define DUEL_INCLUDED
  13.  
  14. #define WIN32_LEAN_AND_MEAN
  15. #include <windows.h>
  16. #include <windowsx.h>
  17. #include <mmsystem.h>
  18. #include "resource.h"
  19. #include <tchar.h>
  20.  
  21. /*
  22.  * Application messages
  23.  */
  24.  
  25. #define UM_LAUNCH       WM_USER
  26. #define UM_ABORT        WM_USER+1
  27. #define UM_RESTARTTIMER WM_USER+2
  28.  
  29. // program states
  30. enum
  31. {
  32.     PS_SPLASH,
  33.     PS_ACTIVE,
  34.     PS_REST
  35. };
  36.  
  37. #define     MAX_SCREEN_X    639
  38. #define     MAX_SCREEN_Y    479
  39. #define     MAX_PLAYERNAME  50
  40. #define        MAX_SESSIONNAME 50
  41. #define        MAX_SPNAME        50
  42. #define        MAX_CLASSNAME    50
  43. #define        MAX_WINDOWTITLE 50
  44. #define        MAX_ERRORMSG    256
  45. #define        MAX_FONTNAME    50
  46. #define        MAX_HELPMSG        512
  47.  
  48. #define     RECEIVE_TIMER_ID    1
  49. #define     RECEIVE_TIMEOUT     1000    // in milliseconds
  50.  
  51. #define     ENUM_TIMER_ID    2
  52. #define     ENUM_TIMEOUT     500    // in milliseconds
  53.  
  54. // default window size
  55. #define        MAX_DEFWIN_X    640
  56. #define        MAX_DEFWIN_Y    480
  57.  
  58.  
  59. // tree view image info
  60. #define CX_BITMAP        25
  61. #define CY_BITMAP        25
  62. #define NUM_BITMAPS         2
  63.  
  64. // registry info
  65. #define DUEL_KEY (TEXT("Software\\Microsoft\\Duel"))
  66.  
  67. // macros
  68. #define DEBUG_OUT(s) OutputDebugString(s);
  69.  
  70. /*
  71.  * fn prototypes
  72.  */
  73.  
  74. int WINAPI        WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
  75.                         int nCmdShow );
  76. long WINAPI        MainWndproc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
  77. BOOL            InitApplication(HINSTANCE hinst);
  78. void            CleanupApplication(void);
  79. BOOL            LaunchedByLobby(void);
  80. BOOL            ShowError( int err );
  81. HWND            ShowConnectStatus(void);
  82. void            UpdateTitle(void);
  83.  
  84. #endif
  85.  
  86.