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 / boids / winproc.h < prev   
Encoding:
C/C++ Source or Header  |  1997-07-15  |  3.3 KB  |  102 lines

  1. #ifndef WINPROC_H
  2. #define WINPROC_H
  3. /*
  4. **-----------------------------------------------------------------------------
  5. **  File:       WinProc.h
  6. **  Purpose:    Sample Window Procedure code
  7. **  Notes:
  8. **
  9. **  Copyright (c) 1995 - 1997 by Microsoft, all rights reserved
  10. **-----------------------------------------------------------------------------
  11. */
  12.  
  13. /*
  14. **-----------------------------------------------------------------------------
  15. **  Include files
  16. **-----------------------------------------------------------------------------
  17. */
  18.  
  19. #include "Common.h"
  20. #include "D3DWin.h"
  21.  
  22.  
  23. /*
  24. **-----------------------------------------------------------------------------
  25. **  Defines
  26. **-----------------------------------------------------------------------------
  27. */
  28.  
  29. #define MENU_DRIVER            0
  30. #define MENU_DEVICE            1
  31. #define MENU_MODE            2
  32. #define MENU_TEXTURE        3
  33. #define MENU_HELP            4
  34.  
  35. #define MENU_FIRST_DRIVER        1500
  36. #define MENU_FIRST_DEVICE        1600
  37. #define MENU_FIRST_MODE            1700
  38. #define MENU_FIRST_TEXTURE        1800
  39. #define MENU_FIRST_TEXFORMAT    1900
  40. #define MENU_LAST_DYNAMIC        2000
  41.  
  42.  
  43.  
  44.  
  45. /*
  46. **-----------------------------------------------------------------------------
  47. **  Function Prototypes
  48. **-----------------------------------------------------------------------------
  49. */
  50.  
  51. // Windows routines
  52. LRESULT CALLBACK D3DWindowProc (HWND hWindow, UINT uiMessage,
  53.                                 WPARAM wParam, LPARAM lParam);
  54.  
  55.  
  56. // Window Message routines
  57. LRESULT OnAbout (HWND hWindow);
  58. LRESULT OnActivate (HWND hWindow, WPARAM wParam, LPARAM lParam);
  59. LRESULT OnActivateApp (HWND hWindow, WPARAM wParam, LPARAM lParam);
  60. LRESULT OnClose (HWND hWindow);
  61. LRESULT OnCommand (HWND hWindow, WPARAM wParam, LPARAM lParam);
  62. LRESULT OnCreate (HWND hWindow);
  63. LRESULT OnDestroy (HWND hWindow);
  64. LRESULT OnDisplayChange (HWND hWindow);
  65. LRESULT OnEraseBackground (HWND hWindow, WPARAM wParam, LPARAM lParam);
  66. LRESULT OnEnterMenuLoop (HWND hWindow, WPARAM wParam, LPARAM lParam);
  67. LRESULT OnExitMenuLoop (HWND hWindow, WPARAM wParam, LPARAM lParam);
  68. LRESULT OnGetMinMaxInfo (HWND hWindow, WPARAM wParam, LPARAM lParam);
  69. LRESULT OnMove (HWND hWindow, WPARAM wParam, LPARAM lParam);
  70. LRESULT OnNCPaint (HWND hWindow, WPARAM wParam, LPARAM lParam);
  71. LRESULT OnPaint (HWND hWindow, HDC hdc, LPPAINTSTRUCT lpps);
  72. LRESULT OnSetCursor (HWND hWindow, WPARAM wParam, LPARAM lParam);
  73. LRESULT OnSize (HWND hWindow, WPARAM wParam, LPARAM lParam);
  74. LRESULT OnSysCommand (HWND hWindow, WPARAM wParam, LPARAM lParam);
  75. LRESULT OnWindowPosChanging (HWND hWindow, WPARAM wParam, LPARAM lParam);
  76.  
  77. // Special Non Message routines
  78. void    OnIdle (HWND hWindow);
  79. void    OnPause (HWND hWindow, BOOL fPause);
  80.  
  81. // D3D Notification routines
  82. LRESULT    OnD3DInit (HWND hWindow, LPD3DWindow lpd3dWindow);
  83. LRESULT    OnD3DFini (HWND hWindow, LPD3DWindow lpd3dWindow);
  84. LRESULT    OnD3DChangeDriver (HWND hWindow);
  85. LRESULT    OnD3DChangeMode (HWND hWindow);
  86. LRESULT    OnD3DChangeDevice (HWND hWindow);
  87. LRESULT    OnD3DChangeFullscreen (HWND hWindow);
  88.  
  89. // Misc Routines
  90. void    PaintPaused (HWND hWindow, HDC hdc);
  91.  
  92.  
  93.  
  94. /*
  95. **-----------------------------------------------------------------------------
  96. **  End of File
  97. **-----------------------------------------------------------------------------
  98. */
  99. #endif // End WINPROC_H
  100.  
  101.  
  102.