Sthplus.h
上传用户:qzstjx
上传日期:2007-01-06
资源大小:84k
文件大小:8k
源码类别:

mpeg/mp3

开发平台:

Visual C++

  1. #ifndef __WINDOWS_H
  2. #include <windows.h>
  3. #endif
  4. //Get the Plus DLL Support VIDEO,AUDIO or CD window
  5. INT APIENTRY QueryPlusCaps(void);
  6. //Retrun FLAGS
  7. #define CAPSPLUS_VIDEO 1
  8. #define CAPSPLUS_AUDIO 2
  9. #define CAPSPLUS_CD 4
  10. //Create the Plus Window
  11. HWND APIENTRY CreatePlusWindow(HANDLE hMainInstance,HWND hwnd,int Flags,FARPROC GetStatusCallBack);
  12. //Return the Plus Window's hwnd or null
  13. typedef DWORD  (APIENTRY *GETSTHVCDSTATUSPROC)(int Cmd,DWORD wParam,DWORD lParam);
  14. //Get SthVCD Playing status See Cmd defined
  15. //Release the DLL Window
  16. void APIENTRY ReleasePlusWindow(void);
  17. //Follow is the Command ID for DLL,WM_COMMAND's wParam=Follow lParam=0
  18. #define STHVCD_OPEN                         40001
  19. #define STHVCD_EXIT                         40002
  20. #define STHVCD_PLAY                         40003
  21. #define STHVCD_STOP                         40004
  22. #define STHVCD_FORWARD                      40005
  23. #define STHVCD_BACKWARD                     40006
  24. #define STHVCD_NOUSE1                       40007
  25. #define STHVCD_NOUSE2                       40008
  26. #define STHVCD_ABOUT                        40009
  27. #define STHVCD_NOUSE3                       40010
  28. #define STHVCD_CLOSE                        40011
  29. #define STHVCD_NOUSE4                       40012
  30. #define STHVCD_MUTE                         40013
  31. #define STHVCD_INCVOLUME                    40014
  32. #define STHVCD_DECVOLUME                    40015
  33. #define STHVCD_SINGLECOLOR                  40016
  34. #define STHVCD_INCU                         40017
  35. #define STHVCD_INCV                         40019
  36. #define STHVCD_NOUSE5                       40020
  37. #define STHVCD_NOUSE6                       40021
  38. #define STHVCD_DECQUALITY                   40022
  39. #define STHVCD_INCQUALITY                   40023
  40. #define STHVCD_44100HZ                      40025
  41. #define STHVCD_22050HZ                      40026
  42. #define STHVCD_NOUSE7                       40027
  43. #define STHVCD_STEREO                       40028
  44. #define STHVCD_LEFTMONO                     40029
  45. #define STHVCD_RIGHTMONO                    40030
  46. #define STHVCD_MIXEDMONO                    40031
  47. #define STHVCD_STEP                         40032
  48. #define STHVCD_LOOP                         40033
  49. #define STHVCD_HELPER                       40037
  50. #define STHVCD_PLAYVCD                      40038
  51. #define STHVCD_DECU                         40039
  52. #define STHVCD_DECV                         40040
  53. #define STHVCD_MODUFYUV                     40041
  54. #define STHVCD_HEAD                         40046
  55. #define STHVCD_END                          40047
  56. #define STHVCD_SEARCH                       40048
  57. #define STHVCD_MODIFYQUALITY                40068
  58. #define STHVCD_ORGSIZE                      40071
  59. #define STHVCD_FULLSCREEN                   40072
  60. #define STHVCD_RESTOREVIDEO                 40073
  61. #define STHVCD_SELECTSTART                  40074
  62. #define STHVCD_SELECTEND                    40075
  63. #define STHVCD_PLAYHIDENVCD                 40094
  64. #define STHVCD_NICETY44100HZ                40096
  65. #define STHVCD_SAVEPIC                      40097
  66. #define STHVCD_INFO                         40098
  67. #define STHVCD_TIP                          40099
  68. #define STHVCD_CONFIG                       40100
  69. #define STHVCD_NEXT                         40101
  70. #define STHVCD_PREV                         40102
  71. #define STHVCD_RETURN                       40103
  72. #define STHVCD_0                            40104
  73. #define STHVCD_1                            40105
  74. #define STHVCD_2                            40106
  75. #define STHVCD_3                            40107
  76. #define STHVCD_4                            40108
  77. #define STHVCD_5                            40109
  78. #define STHVCD_6                            40110
  79. #define STHVCD_7                            40111
  80. #define STHVCD_8                            40112
  81. #define STHVCD_9                            40113
  82. #define STHVCD_00                           40114
  83. #define STHVCD_10                           40115
  84. #define STHVCD_20                           40116
  85. #define STHVCD_30                           40117
  86. #define STHVCD_40                           40118
  87. #define STHVCD_50                           40119
  88. #define STHVCD_60                           40120
  89. #define STHVCD_70                           40121
  90. #define STHVCD_80                           40122
  91. #define STHVCD_90                           40123
  92. #define STHVCD_PLAYMULTIFILES               40124
  93. #define STHVCD_SAVEMPA                      40125
  94. #define STHVCD_PLAYSAVE                     40126
  95. #define STHVCD_SAVESEQUENCE                 40127
  96. #define STHVCD_SHOWTIME                     40128
  97. #define STHVCD_KARAOKE                      40129
  98. #define STHVCD_EJECT                        40130
  99. #define STHVCD_INSERTCD                     40131
  100. #define STHVCD_KARAOKELEFT                  40132
  101. #define STHVCD_TESTSPEED                    40133
  102. #define STHVCD_DISPLAYSETTING               40134
  103. #define STHVCD_WINDOWSETTING                40135
  104. #define STHVCD_PLAYMP3                      40136
  105. #define STHVCD_YUVORDER                     40137
  106. #define STHVCD_BUFFERFRAMES                 40138
  107. #define STHVCD_INCY                         40139
  108. #define STHVCD_DECY                         40140
  109. #define STHVCD_MP3SEARCH                    40141
  110. #define STHVCD_SAVEMPV                      40142
  111. #define STHVCD_MICROPHONE                   40143
  112. #define STHVCD_PLAYNEXTDISC                 40144
  113. #define STHVCD_PLAYVCD11                    40145
  114. #define STHVCD_NOUSE8                       40146
  115. #define STHVCD_INCECHO                      40147
  116. #define STHVCD_DECECHO                      40148
  117. #define STHVCD_PLAYDVB                      40149
  118. #define STHVCD_AUDIOSTRM0                   40150
  119. #define STHVCD_AUDIOSTRM1                   40151
  120. #define STHVCD_D1SIZE                       40152
  121. #define STHVCD_PLAYTRACK                    40153
  122. #define STHVCD_SETEQUALIZE                  40154
  123. #define STHVCD_RANDOM                       40155
  124. #define STHVCD_SELECTFACEBMP                40156
  125. #define STHVCD_CREATEDLL                    40157
  126. #define STHVCD_RELEASEDLL                   40158
  127. //SthVCD Cmd defined
  128. #define MAXCMD 32
  129. #define STATUS_GETSUPPORT 0
  130. #define STATUS_GETVERSION 1
  131. #define STATUS_GETOPENSTATUS 2
  132. #define STATUS_GETFULLSCREEN 3
  133. #define STATUS_GETAUDIOMUTE 4
  134. #define STATUS_GETFILELENGTH 5
  135. #define STATUS_GETBYTERATE 6
  136. #define STATUS_GETTIMELENGTH 7
  137. #define STATUS_GETCURRENTTIME 8
  138. #define STATUS_GETCURRENTFILEPOS 9
  139. #define STATUS_SETCURRENTFILEPOS 10 //wParam=FILE_BEGIN/CURRENT/END lParam=Pos
  140. #define STATUS_SETCURRENTTIMEPOS 11 //wParam=TIME in Second
  141. #define STATUS_GETAUDIOVOLUME 12 //wParam=*lpLeftVolume lParam=*lpRightVolume
  142. #define STATUS_SETAUDIOVOLUME 13 //wParam=LeftVolume lParam=RightVolume
  143. #define STATUS_GETLUMANCEY 14
  144. #define STATUS_SETLUMANCEY 15 //wParam=Y
  145. #define STATUS_GETUV 16 //wParam=*lpUColor lParam=*lpVColor
  146. #define STATUS_SETUV 17 //wParam=UColor lParam=VColor
  147. #define STATUS_GETECHO 18
  148. #define STATUS_SETECHO 19 //wParam=Echo
  149. #define STATUS_GETSINGLECOLOR 20
  150. #define STATUS_SWITCHSINGLECOLOR 21
  151. #define STATUS_SWITCHFULLSCREEN 22
  152. #define STATUS_SWITCHAUDIOMUTE 23
  153. #define STATUS_SETLEFTMONO 24
  154. #define STATUS_SETRIGHTMONO 25
  155. #define STATUS_SETSTEREO 26
  156. #define STATUS_SETMIXEDMONO 27
  157. #define STATUS_GETLOOPSTATUS 28
  158. #define STATUS_SWITCHLOOP 29
  159. #define STATUS_SETSELECTSTART 30
  160. #define STATUS_SETSELECTEND 31
  161. #define STATUS_SWITCHSHOWTIME 32
  162. #define STATUS_GETPLAYING 33
  163. #define STATUS_GETMICINIT 34
  164. #define STATUS_GETMICMUTE 35
  165. #define STATUS_SETMICMUTE 36
  166. #define STATUS_GETMICVOLUME 37 //wParam=*lpLeftVolume lParam=*lpRightVolume
  167. #define STATUS_SETMICVOLUME 38 //wParam=LeftVolume lParam=RightVolume (0 .. 65535)
  168. //--------------------------------------------------------------------------------------------
  169. #define MAX_BUTTON_COUNT 1  //now, there is only 1 button
  170. #define maxX 628
  171. #define maxY 169
  172. HRGN hRgns[MAX_BUTTON_COUNT+1]={0,0};  //Rgn handle of every button, hRgns[0] is reserved
  173. HDC memdc; //Virtual window dc
  174. HDC hdc;   //PlusWindow dc
  175. HDC mdc;   //mem temp dc
  176. HBITMAP hBit;
  177. RECT winRect;
  178. int Button = 0;
  179. int OnButton(LPARAM lParam);
  180. void SethRgns(void);
  181. void DelhRgns(void);
  182. void ShowTime(int hour, int minute, int second, int X, int Y);
  183. void DrawTime(int number, int x, int y);
  184. void CALLBACK HandleTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime );