#include<mmsystem.h>
#pragma comment(lib,"winmm.lib")
char buf[256];
void CMyPlayerDlg::OnOpen()
{
// TODO: Add your command handler code here
CStatic* 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 here
mciSendString("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 here
mciSendString("close movie",buf,sizeof(buf),NULL);
}
mciSendString("play movie",buf,sizeof(buf),NULL)
最新推荐文章于 2021-03-11 14:51:50 发布