mciSendString("play movie",buf,sizeof(buf),NULL)

来源:互联网 发布:城市与文明游戏 知乎 编辑:程序博客网 时间:2024/04/30 11:31
#include<mmsystem.h>#pragma comment(lib,"winmm.lib") char buf[256];void CMyPlayerDlg::OnOpen() {// TODO: Add your command handler code hereCStatic* pStatic=(CStatic*)GetDlgItem(IDC_STATIC_PIC);HWND h=pStatic->GetSafeHwnd();CString open1;open1.Format("open F:\\avr视频教程\\lesson5\\lesson5-1.avi type MPEGVideo Alias movie parent \%u Style %u notify",h,WS_CHILD);mciSendString(open1.GetBuffer(open1.GetLength()),buf,sizeof(buf),NULL);//////mciSendString("play movie fullscreen",buf,sizeof(buf),NULL);mciSendString("play movie",buf,sizeof(buf),NULL);}void CMyPlayerDlg::OnPause() {// TODO: Add your command handler code heremciSendString("pause movie",buf,sizeof(buf),NULL);}void CMyPlayerDlg::OnFullscreen() {mciSendString("play movie fullscreen",buf,sizeof(buf),NULL);}void CMyPlayerDlg::OnClose() {// TODO: Add your command handler code heremciSendString("close movie",buf,sizeof(buf),NULL);}


	
				
		
原创粉丝点击