home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Players / DDrawXCL / ddrawxcl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  3.7 KB  |  111 lines

  1. //------------------------------------------------------------------------------
  2. // File: DDrawXcl.h
  3. //
  4. // Desc: DirectShow sample code - DDraw Exclusive Mode Video Playback 
  5. //       test/sample application header file.
  6. //
  7. // Copyright (c) 1993-2001 Microsoft Corporation. All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10.  
  11. //
  12. // App menu ids
  13. //
  14. #define IDM_SELECTDVD        101
  15. #define IDM_SELECTFILE       102
  16. #define IDM_ABOUT            103
  17. #define IDM_EXIT             104
  18.  
  19. #define IDM_STARTPLAY        111
  20.  
  21. #define IDC_STATIC           -1
  22.  
  23. //
  24. // Version info related constant ids
  25. //
  26. #define DLG_VERFIRST        400
  27. #define IDC_COMPANY         DLG_VERFIRST
  28. #define IDC_FILEDESC        DLG_VERFIRST+1
  29. #define IDC_PRODVER         DLG_VERFIRST+2
  30. #define IDC_COPYRIGHT       DLG_VERFIRST+3
  31. #define IDC_OSVERSION       DLG_VERFIRST+4
  32. #define IDC_TRADEMARK       DLG_VERFIRST+5
  33. #define DLG_VERLAST         DLG_VERFIRST+5
  34.  
  35. #define IDC_LABEL           DLG_VERLAST+1
  36.  
  37. //
  38. // Message displayed on failure to start playback
  39. //
  40. #define STR_EXCLUSIVE_MODE_FAILURE                                                          \
  41.     TEXT("Exclusive mode playback failed to start.")                                        \
  42.     TEXT("\nPlease verify that the selected file can be played with your video card.")      \
  43.     TEXT("\n\nMore information:")                                                           \
  44.     TEXT("\n----------------------")                                                        \
  45.     TEXT("\nSome display cards do not support RGB overlays in hardware, but the decoder\n") \
  46.     TEXT("used by the selected media file may require them.  If the filter upstream\n")     \
  47.     TEXT("of the overlay mixer proposes only RGB formats, and the video card does not\n")   \
  48.     TEXT("support RGB overlays in hardware, then the filter graph manager will not\n")      \
  49.     TEXT("be able to connect the filters to complete the graph.")
  50.  
  51.  
  52. //
  53. // App string resource ids
  54. //
  55. #define IDS_APP_TITLE       500
  56. #define IDS_APP_NAME        501
  57. #define IDS_WINDOW_TITLE    502
  58. #define IDS_VER_INFO_LANG   503
  59. #define IDS_VERSION_ERROR   504
  60.  
  61.  
  62. //
  63. // Some constants
  64. //
  65. #define TIMER_ID        1
  66. #define TIMER_RATE      100
  67.  
  68. //
  69. // Some enumerated types
  70. //
  71. typedef enum {
  72.     Unspecified = 0, DVD , File
  73. } VIDEO_TYPE ;
  74.  
  75.  
  76. //
  77. // Function signatures for Windows
  78. //
  79. int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
  80.                      LPSTR lpCmdLine, int nCmdShow) ;
  81. BOOL    InitApplication(void) ;
  82. BOOL    InitInstance(int nCmdShow) ;
  83. LRESULT CALLBACK MenuProc(HWND hWnd, WPARAM wParam, LPARAM lParam) ;
  84. LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ;
  85. LRESULT CALLBACK KeyProc(HWND hWnd, WPARAM wParam, LPARAM lParam) ;
  86. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) ;
  87. LRESULT StartPlay(HWND hWndApp) ;
  88. LRESULT OnPlaybackEvent(HWND hWnd, WPARAM wParam, LPARAM lParam) ;
  89. void    OnEndOfPlayback(HWND hWnd) ;
  90. void    SetVideoPosition(BOOL bSetBallPosition) ;
  91. BOOL    FileSelect(HWND hWnd, VIDEO_TYPE eType) ;
  92. BOOL    CreatePlayer(VIDEO_TYPE eType) ;
  93. BOOL    IsVideoTypeKnown(void) ;
  94. VIDEO_TYPE  GetVideoType(void) ;
  95.  
  96.  
  97. //
  98. //  Global variables used by the (Windows) app
  99. //
  100. HWND                ghWndApp ;
  101. TCHAR               gszAppName[10] ;
  102. TCHAR               gszAppTitle[100] ;
  103. TCHAR               gszDirection[100] ;
  104. HINSTANCE           ghInstance ;
  105.  
  106. CBaseVideoPlayer   *gpPlayer ;
  107. CDDrawObject       *gpDDrawObj ;
  108. UINT                guTimerID ;
  109. VIDEO_TYPE          geVideoType ;
  110. BOOL                gbAppActive ;
  111.