-
插入activeX控件
-
类向导
-
双击mediaplayer插入对应的库文件
-
导入头文件
#include "wmpplayer4.h"
#include "wmpsettings.h"
#include "wmpcontrols.h"
- 创建对应的变量
CWMPPlayer4 player;//在类向导自动绑定
CWMPControls playerControl;
CWMPSettings playerSettings;
- 初始化窗口时绑定对应变量
this->player.SetUrl("C:\vlc.mp4");
// TODO: Add extra initialization here
this->playerSettings=this->player.GetSettings();
this->playerControl=this->player.GetControls();
//循环播放
this->playerSettings.setMode("loop",TRUE);