在VC++中实现自动连续播放多媒体
2008-02-26 20:27:20 来源:WEB开发网核心提示:二、ACTIVEMOVIE CONTROL OBJECT的常用属性1、播放文件的函数:void CActiveMovie3::Run(){InvokeHelper(0x60020001, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);}2、暂停播放的函数:void CActiveMovi
二、ACTIVEMOVIE CONTROL OBJECT的常用属性
1、播放文件的函数:
void CActiveMovie3::Run()
{
InvokeHelper(0x60020001, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
2、暂停播放的函数:
void CActiveMovie3::Pause()
{
InvokeHelper(0x60020002, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
4、停止播放的函数:
void CActiveMovie3::Stop()
{
InvokeHelper(0x60020003, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
5、获得文件的函数:
CString CActiveMovie3::GetFileName()
{
CString result;
InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
6、设置文件的函数:
void CActiveMovie3::SetFileName(LPCTSTR lpszNewValue)
{
static BYTE parms[] = VTS_BSTR;
InvokeHelper(0xb, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
7、获得播放位置的函数:
double CActiveMovie3::GetCurrentPosition()
{
double result;
InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, NULL);
return result;
}
8、设置播放位置的函数:
void CActiveMovie3::SetCurrentPosition(double newValue)
{
static BYTE parms[] = VTS_R8;
InvokeHelper(0xd, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
9、获得音量的函数:
long CActiveMovie3::GetVolume()
{
long result;
InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
10、设置音量的函数:
void CActiveMovie3::SetVolume(long nNewValue)
{
static BYTE parms[] = VTS_I4;
InvokeHelper(0x13, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue);
}
11、设置自动开始播放的函数:
void CActiveMovie3::SetAutoStart(BOOL bNewValue)
{
static BYTE parms[] = VTS_BOOL;
InvokeHelper(0x28, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, bNewValue);
}
更多精彩
赞助商链接