音乐播放函数MCI(不断更新)

音乐播放函数MCI(不断更新)
1、打开一个音乐文件

HWND MCIWndCreate(
  HWND hwndParent,                                                              //父窗口句柄  GetSafeHwnd();                        
  HINSTANCE hInstance,                                                        //与MCIWnd窗口关联的模块实例句柄  AfxGetInstanceHandle()
  DWORD dwStyle,                                                                   //WS_CHILD | MCIWNDF_NOMENU
  LPSTR szFile                                                                          //音乐文件路径 
);


成功:返回MCI窗口句柄。
失败:返加0。

要求:

  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Vfw.h.
  Library: Use Vfw32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP.




LONG MCIWndPlay( hwnd  );       //播放
LONG MCIWndPause( hwnd );     //暂停

LONG MCIWndSetVolume(
hwnd,
iVol                          //  New volume level. Specify 1000 for normal volume level. Specify a higher value for a louder volume or a lower value for a quieter volume.
);                                                    //音量设置

LONG MCIWndResume(  hwnd  );          //从暂停恢复播放

LONG MCIWndStop(  hwnd  );              //停止播放

你可能感兴趣的:(音乐播放函数MCI(不断更新))