基于MFC的Media Player播放器的制作(4---功能实现代码)
| 版权声明:本文为博主原创文章,未经博主允许不得转载。
PandaPlayerDlg.h
// PandaPlayerDlg.h : header file
//
//{{AFX_INCLUDES()
#include "wmpplayer4.h"
#include "wmpcontrols.h"
#include "wmpsettings.h"
//}}AFX_INCLUDES #if !defined(AFX_PANDAPLAYERDLG_H__BD44EB72_E7B8_4CCE_831C_6781A9FDFD2B__INCLUDED_)
#define AFX_PANDAPLAYERDLG_H__BD44EB72_E7B8_4CCE_831C_6781A9FDFD2B__INCLUDED_ #if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000 /////////////////////////////////////////////////////////////////////////////
// CPandaPlayerDlg dialog class CPandaPlayerDlg : public CDialog
{
// Construction
public:
CPandaPlayerDlg(CWnd* pParent = NULL); // standard constructor //文件关联对象的变量声明
CWMPControls setControl;
CWMPSettings setVolume;
CSliderCtrl *pSlidCtrl;
CSliderCtrl sliderVolume; // Dialog Data
//{{AFX_DATA(CPandaPlayerDlg)
enum { IDD = IDD_PANDAPLAYER_DIALOG };
CWMPPlayer4 m_ActiveMovie;
//}}AFX_DATA // ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPandaPlayerDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL // Implementation
protected:
HICON m_hIcon; void listDisplay(CString a[]); // Generated message map functions
//{{AFX_MSG(CPandaPlayerDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnExit();
afx_msg void OnFullscreen();
afx_msg void OnOpen();
afx_msg void OnPlay();
afx_msg void OnPause();
afx_msg void OnStop();
afx_msg void OnGo();
afx_msg void OnBack();
afx_msg void OnAbout();
afx_msg void OnOpenfiles();
afx_msg void OnMute();
afx_msg void OnLower();
afx_msg void OnUpper();
afx_msg void OnOutofmemoryVolumeslider();
afx_msg void OnNext();
afx_msg void OnPrevious();
afx_msg void OnLoop();
afx_msg void OnOrder();
afx_msg void OnRandom();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnFullscr();
afx_msg void OnOnlyplay();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
}; //{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_PANDAPLAYERDLG_H__BD44EB72_E7B8_4CCE_831C_6781A9FDFD2B__INCLUDED_)
PandaPlayerDlg.cpp
// PandaPlayerDlg.cpp : implementation file
// #include "stdafx.h"
#include "PandaPlayer.h"
#include "PandaPlayerDlg.h" #ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif //文件数组大小预定义
#define N 100 //全局变量声明
static int count = ;
static int times = ;
static int modelFlag = ;
static int flag = ; //0表示
static int playStatus = ;
static int pauseStatus = ;
static int stopStatus = ; static int volumeSlider = ;
static long maxVloume = ;
static bool listFlag = true;
CString filesPath[N] = {"\0"};
time_t t; /////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About class CAboutDlg : public CDialog
{
public:
CAboutDlg(); // Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA // ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL // Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
}; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
} void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
} BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP() /////////////////////////////////////////////////////////////////////////////
// CPandaPlayerDlg dialog CPandaPlayerDlg::CPandaPlayerDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPandaPlayerDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPandaPlayerDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
} void CPandaPlayerDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPandaPlayerDlg)
DDX_Control(pDX, IDC_OCX1, m_ActiveMovie);
//}}AFX_DATA_MAP
} BEGIN_MESSAGE_MAP(CPandaPlayerDlg, CDialog)
//{{AFX_MSG_MAP(CPandaPlayerDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_EXIT, OnExit)
ON_BN_CLICKED(IDC_FULLSCREEN, OnFullscreen)
ON_BN_CLICKED(IDC_OPEN, OnOpen)
ON_BN_CLICKED(IDC_PLAY, OnPlay)
ON_BN_CLICKED(IDC_PAUSE, OnPause)
ON_BN_CLICKED(IDC_STOP, OnStop)
ON_BN_CLICKED(IDC_GO, OnGo)
ON_BN_CLICKED(IDC_BACK, OnBack)
ON_BN_CLICKED(IDC_ABOUT, OnAbout)
ON_BN_CLICKED(IDC_OPENFILES, OnOpenfiles)
ON_BN_CLICKED(IDC_MUTE, OnMute)
ON_BN_CLICKED(IDC_LOWER, OnLower)
ON_BN_CLICKED(IDC_UPPER, OnUpper)
ON_NOTIFY(NM_OUTOFMEMORY, IDC_VOLUMESLIDER, OnOutofmemoryVolumeslider)
ON_BN_CLICKED(IDC_NEXT, OnNext)
ON_BN_CLICKED(IDC_PREVIOUS, OnPrevious)
ON_BN_CLICKED(IDC_LOOP, OnLoop)
ON_BN_CLICKED(IDC_ORDER, OnOrder)
ON_BN_CLICKED(IDC_RANDOM, OnRandom)
ON_WM_TIMER()
ON_BN_CLICKED(IDC_FULLSCR, OnFullscr)
ON_BN_CLICKED(IDC_ONLYPLAY, OnOnlyplay)
//}}AFX_MSG_MAP
END_MESSAGE_MAP() /////////////////////////////////////////////////////////////////////////////
// CPandaPlayerDlg message handlers BOOL CPandaPlayerDlg::OnInitDialog()
{
CDialog::OnInitDialog(); //添加文件关联
setControl = static_cast<CWMPControls>(m_ActiveMovie.GetControls());
setVolume = m_ActiveMovie.GetSettings(); //文件列表的初始化的状态为列表处于关闭的状态
SetWindowPos(NULL,,,,,SWP_NOMOVE); //初始化音量的滑块条的初始位置
//sliderVolume.SetRange(0, 100, true);
pSlidCtrl = (CSliderCtrl*)GetDlgItem(IDC_VOLUMESLIDER);
pSlidCtrl->SetPos(setVolume.GetVolume()); //得到初始化时的声音滑块条的位置坐标
volumeSlider = pSlidCtrl->GetPos(); //得到最大的音量值
maxVloume = setVolume.GetVolume();// * 2 //初始化文件数组
filesPath[] = "\0"; // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
} // Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here return TRUE; // return TRUE unless you set the focus to a control
} void CPandaPlayerDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
} // If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework. void CPandaPlayerDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), ); // Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + ) / ;
int y = (rect.Height() - cyIcon + ) / ; // Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
} // The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CPandaPlayerDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
} //打开文件
void CPandaPlayerDlg::OnOpen()
{
// TODO: Add your control notification handler code here
char szFileFilter[]="Mp3 File&(*.mp3)|*.mp3|"
"Wma File((*.wma)|*.wma|"
"Video File(*.dat)|*.dat|"
"Wave File(*.wav)|*.wav|"
"AVI File(*.avi)|*.avi|"
"Movie File(*.mov)|*.mov|"
"Media File(*.mmm)|*.mmm|"
"Mid File(*.mid *.rmi)|*.mid *.rmi|"
"MPEG File(*.mpeg)|*.mpeg|"
"All File(*.*)|*.*|| ";//文件类型过滤
CFileDialog dlg(TRUE,NULL,NULL,OFN_HIDEREADONLY,szFileFilter);
if(dlg.DoModal()==IDOK)
{
CString strFilePath = dlg.GetPathName();
//strFilePath.MakeUpper();
filesPath[count++] = strFilePath;
m_ActiveMovie.SetUrl(strFilePath);
times = count;
}
} //列表播放文件项目的显示
void CPandaPlayerDlg::listDisplay(CString fileUrl[])
{
int index = times;
for(int i = ; i < index; i++)
{ }
} //播放文件
void CPandaPlayerDlg::OnPlay()
{
// TODO: Add your control notification handler code here
setControl.play();
//如果是播放状态的时候,播放则为1,暂停和停止均为0
playStatus = ;
pauseStatus = ;
stopStatus = ;
} //暂停播放
void CPandaPlayerDlg::OnPause()
{
// TODO: Add your control notification handler code here
setControl.pause();
//如果暂停为真,则暂停为1,播放和停止为0
playStatus = ;
pauseStatus = ;
stopStatus = ;
} //停止播放
void CPandaPlayerDlg::OnStop()
{
// TODO: Add your control notification handler code here
setControl.stop();
//如果停止为真,则停止为1,播放和暂停为0
playStatus = ;
pauseStatus = ;
stopStatus = ; } //快进
void CPandaPlayerDlg::OnGo()
{
// TODO: Add your control notification handler code here
double CurrPosition = setControl.GetCurrentPosition();
setControl.SetCurrentPosition(CurrPosition+);
} //快退
void CPandaPlayerDlg::OnBack()
{
// TODO: Add your control notification handler code here
double CurrPosition = setControl.GetCurrentPosition();
setControl.SetCurrentPosition(CurrPosition-);
} //关于框的调用函数
void CPandaPlayerDlg::OnAbout()
{
// TODO: Add your control notification handler code here
CAboutDlg aboutDlg;
aboutDlg.DoModal();
} //文件列表框的弹出和关闭函数
void CPandaPlayerDlg::OnOpenfiles()
{
// TODO: Add your control notification handler code here
listFlag=!listFlag;
if(listFlag)
{
//两个数字分别表示宽和高
SetWindowPos(NULL,,,,,SWP_NOMOVE);
}
else
{
//文件列表的三个函数在wmpcontrols.h,wmpplaylist.h和wmpmedia.h中
//分别是CWMPMedia GetCurrentItem();void SetCurrentItem(LPDISPATCH newValue);void playItem(LPDISPATCH pIWMPMedia);
SetWindowPos(NULL,,,,,SWP_NOMOVE);
CString str;
}
} //声音控制的静音函数
void CPandaPlayerDlg::OnMute()
{
// TODO: Add your control notification handler code here
if(setVolume.GetMute())
{
setVolume.SetMute(false);
}
else
{
setVolume.SetMute(true);
}
} //降低音量函数
void CPandaPlayerDlg::OnLower()
{
// TODO: Add your control notification handler code here
long currVolume = setVolume.GetVolume();
if(setVolume.GetMute())
{
MessageBox(_T("已处于静音状态,不能降低音量"), _T("警告"), MB_OK);
}
else
{
setVolume.SetVolume(currVolume-);
}
//减少音量之后重新设置音量的滑动条的位置坐标
volumeSlider = pSlidCtrl->GetPos();
flag = ;
OnOutofmemoryVolumeslider();
} //音量增加函数
void CPandaPlayerDlg::OnUpper()
{
// TODO: Add your control notification handler code here
long currVolume = setVolume.GetVolume();
if(setVolume.GetMute())
{
MessageBox(_T("已处于静音状态,不能增加音量"), _T("警告"), MB_OK);
}
else
{
setVolume.SetVolume(currVolume+);
}
//增加音量之后重新设置音量的滑动条的位置坐标
volumeSlider = pSlidCtrl->GetPos();
flag = ;
OnOutofmemoryVolumeslider();
} //音量滑块条的控制
void CPandaPlayerDlg::OnOutofmemoryVolumeslider()
{
// TODO: Add your control notification handler code here
int indexSlider;
if(flag == || flag == )
{
pSlidCtrl->SetPos(setVolume.GetVolume());
}
else
{
indexSlider = pSlidCtrl->GetPos();
//如果indexSlider-volumeSlider>0,说明滑动条往声音调大的范围滑动
if(indexSlider-volumeSlider>=)
{
setVolume.SetVolume(setVolume.GetVolume()+((indexSlider-volumeSlider)/maxVloume)*);
}
else
{
setVolume.SetVolume(setVolume.GetVolume()-((indexSlider-volumeSlider)/maxVloume)*);
}
}
} //退出函数
void CPandaPlayerDlg::OnExit()
{
// TODO: Add your control notification handler code here
setControl.stop();
exit();
} //窗口关闭函数
void CPandaPlayerDlg::OnFullscreen()
{
// TODO: Add your control notification handler code here
static int flag1 = ;
if(flag1%==)
{
//将状态标志设为暂停的标志(暂停为1, 播放和停止为0)
pauseStatus = ;
playStatus = ;
stopStatus = ;
m_ActiveMovie.ShowWindow(false);
}
else
{
//将状态标志设为播放的标志(播放为1, 暂停和停止为0)
pauseStatus = ;
playStatus = ;
stopStatus = ;
m_ActiveMovie.ShowWindow(true);
}
flag1++; } //全屏模式
void CPandaPlayerDlg::OnFullscr()
{
// TODO: Add your control notification handler code here
if(m_ActiveMovie.GetFullScreen())
{
m_ActiveMovie.SetFullScreen(false);
}
else
{
m_ActiveMovie.SetFullScreen(true);
}
} //下一曲函数
void CPandaPlayerDlg::OnNext()
{
// TODO: Add your control notification handler code here
if(modelFlag==)
{
if(filesPath[times+] == "\0")
{
times = ;
CString playFiles = filesPath[times++];
m_ActiveMovie.SetUrl(playFiles);
}
else
{
CString playFiles = filesPath[times++];
m_ActiveMovie.SetUrl(playFiles);
}
}
else
{
if(filesPath[times+] == "\0")
{
MessageBox(_T("已到达文件列表尾"),_T("警告"),MB_OK);
}
else
{
CString playFiles = filesPath[times++];
m_ActiveMovie.SetUrl(playFiles);
}
}
} //上一曲函数
void CPandaPlayerDlg::OnPrevious()
{
// TODO: Add your control notification handler code here
if(modelFlag==)
{
if(times- < )
{
times = count;
CString playFiles = filesPath[times--];
m_ActiveMovie.SetUrl(playFiles);
}
else
{
CString playFiles = filesPath[times--];
m_ActiveMovie.SetUrl(playFiles);
}
}
else
{
if(times- < )
{
MessageBox(_T("已到达文件列表头"),_T("Warning"),MB_OK);
}
else
{
CString playFiles = filesPath[times--];
m_ActiveMovie.SetUrl(playFiles);
}
}
} //循环播放
void CPandaPlayerDlg::OnLoop()
{
// TODO: Add your control notification handler code here
modelFlag = ;
if(filesPath[] == "\0")
{
MessageBox(_T("列表无文件!"),_T("警告"),MB_OK);
CPandaPlayerDlg::OnOpen();
}
else
{
if(setControl.GetCurrentPosition() == )
{
//此时说明播放已经停止,可以进入下一曲播放了
if(filesPath[times+] != "\0")
{
CString playFiles = filesPath[times++];
m_ActiveMovie.SetUrl(playFiles);
setControl.SetCurrentPosition(0.01);
}
else
{
times = ;
CString playFiles = filesPath[times++];
m_ActiveMovie.SetUrl(playFiles);
setControl.SetCurrentPosition(0.01);
}
}
else
{
//通过标志来判断是否进行那种类型的播放状态
if(playStatus == && pauseStatus == && stopStatus == )
setControl.play();
else if(pauseStatus == && playStatus == && stopStatus == )
setControl.pause();
else if(stopStatus == && playStatus == && pauseStatus == )
setControl.stop();
else
{
MessageBox(_T("出现错误"),_T("ERROR"),MB_OK);
}
}
}
SetTimer(,,NULL);
} //顺序播放
void CPandaPlayerDlg::OnOrder()
{
// TODO: Add your control notification handler code here
modelFlag = ;
if(filesPath[] == "\0")
{
MessageBox(_T("列表无文件!"),_T("警告"),MB_OK);
CPandaPlayerDlg::OnOpen();
}
else
{
if(setControl.GetCurrentPosition() == )
{
//此时说明播放已经停止,可以进入下一曲播放了
//首先判断列表是否为空
if(filesPath[times+] != "\0")
{
CString playFiles = filesPath[times++];
m_ActiveMovie.SetUrl(playFiles);
setControl.SetCurrentPosition(0.01);
}
else
{
MessageBox(_T("已到列表末尾!"),_T("Warning"),MB_OK);
CString playFiles = filesPath[];
m_ActiveMovie.SetUrl(playFiles);
setControl.SetCurrentPosition(0.01);
}
}
else
{
if(playStatus == && pauseStatus == && stopStatus == )
setControl.play();
else if(pauseStatus == && playStatus == && stopStatus == )
setControl.pause();
else if(stopStatus == && playStatus == && pauseStatus == )
setControl.stop();
else
{
MessageBox(_T("出现错误"),_T("ERROR"),MB_OK);
}
}
}
SetTimer(,,NULL);
} //随机播放
void CPandaPlayerDlg::OnRandom()
{
// TODO: Add your control notification handler code here
modelFlag = ;
if(filesPath[] == "\0")
{
MessageBox(_T("列表无文件!"),_T("警告"),MB_OK);
CPandaPlayerDlg::OnOpen();
}
else
{
if(setControl.GetCurrentPosition() == )
{
//此时说明播放已经停止,可以进入下一曲播放了
srand((unsigned)time(&t));
int index = rand() % count + ;
CString playFiles = filesPath[index];
m_ActiveMovie.SetUrl(playFiles);
setControl.SetCurrentPosition(0.01);
}
else
{
if(playStatus == && pauseStatus == && stopStatus == )
setControl.play();
else if(pauseStatus == && playStatus == && stopStatus == )
setControl.pause();
else if(stopStatus == && playStatus == && pauseStatus == )
setControl.stop();
else
{
MessageBox(_T("出现错误"),_T("ERROR"),MB_OK);
}
}
}
SetTimer(,,NULL);
} //单曲循环播放
void CPandaPlayerDlg::OnOnlyplay()
{
// TODO: Add your control notification handler code here
modelFlag = ;
if(filesPath[] == "\0")
{
MessageBox(_T("列表无文件!"),_T("警告"),MB_OK);
CPandaPlayerDlg::OnOpen();
}
else
{
if(setControl.GetCurrentPosition() == )
{
int index = times;
CString playFiles = filesPath[index];
m_ActiveMovie.SetUrl(playFiles);
setControl.SetCurrentPosition(0.01);
}
else
{
if(playStatus == && pauseStatus == && stopStatus == )
setControl.play();
else if(pauseStatus == && playStatus == && stopStatus == )
setControl.pause();
else if(stopStatus == && playStatus == && pauseStatus == )
setControl.stop();
else
{
MessageBox(_T("出现错误"),_T("ERROR"),MB_OK);
}
}
}
SetTimer(,,NULL);
} //定时器
void CPandaPlayerDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default switch(nIDEvent)
{
case :
{
KillTimer();
OnLoop();
break;
}
case :
{
KillTimer();
OnOrder();
break;
}
case :
{
KillTimer();
OnRandom();
break;
}
case :
{
KillTimer();
OnOnlyplay();
break;
}
} CDialog::OnTimer(nIDEvent);
}
基于MFC的Media Player播放器的制作(4---功能实现代码)的更多相关文章
- 基于MFC的Media Player播放器的制作(3---功能实现)
| 版权声明:本文为博主原创文章,未经博主允许不得转载. 下面我们试试一下,按下退出Button退出播放器的功能: 首先,我们双击退出Button按钮,就会弹出下图的框: 上面的弄好之后我们就实现 ...
- 基于MFC的Media Player播放器的制作介绍
| 版权声明:本文为博主原创文章,未经博主允许不得转载. 因为这次多媒体课程设计做一个基于MFC的播放器,因为本人实力太菜,需要播放音乐或视频文件时候,自己写不出解码 函数,所以准备使用第三方多媒 ...
- 基于MFC的Media Player播放器的制作(1---播放器界面的布局)
| 版权声明:本文为博主原创文章,未经博主允许不得转载. 通过上面的一些预备知识,我们现在就可以自己来制作基于MFC的播放器了,接下来我们讲的是使用MFC制作我们播放器 的界面. 首先,我们我们打 ...
- 基于MFC的Media Player播放器的制作(2---导入第三方库和介绍第三方库)
| 版权声明:本文为博主原创文章,未经博主允许不得转载. 这一节我们介绍如何导入类库,和介绍类库的一功能和介绍MFC的一些主要的模块部分.下面是如何导入类库.第一步我们选中 Media Playe ...
- 基于MFC的Media Player播放器的控件方法和属性介绍
| 版权声明:本文为博主原创文章,未经博主允许不得转载. 因为使用第三方多媒体库或是第三方控件(Media Player)辅助播放,我们则必须要了解到Media Player控件的一些属性 和方法 ...
- 基于MFC的Media Player播放器制作的SetTimer函数介绍
| 版权声明:本文为博主原创文章,未经博主允许不得转载. SetTimer是一种API函数,位于user32.dll中.你想每隔一段时间执行一件事的的时候,你可以使用它. 使用定时器的方法比 较简 ...
- winform中的Windows Media Player播放器设置
namespace WindowsMediaPlayer{ public partial class Form1 : Form { Form2 form2;//声明from2窗体 public For ...
- 最简单的基于FFMPEG+SDL的音频播放器 ver2 (采用SDL2.0)
===================================================== 最简单的基于FFmpeg的音频播放器系列文章列表: <最简单的基于FFMPEG+SDL ...
- 基于jQuery仿QQ音乐播放器网页版代码
基于jQuery仿QQ音乐播放器网页版代码是一款黑色样式风格的网页QQ音乐播放器样式代码.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="m ...
随机推荐
- 洛谷P3366 【模板】最小生成树(LCT)
[模板]最小生成树 题目传送门 解题思路 用LCT来维护最小生成树. 除了把各顶点作为节点外,每条边也都视为一个节点.对于要加入的边\(e\),检查其两顶点\(x\)和\(y\)是否在同一棵树中,如果 ...
- dubbo远程服务调用和maven依赖的区别
dubbo:跨系统通信.比如:两个系统,一个系统A作客户端,一个系统B作服务器, 服务器B把自己的接口定义提供给客户端A,客户端A将接口定义在spring中的bean.客户端A可直接使用这个bean, ...
- 【Python-Django讲义】针对django的ppt讲义
MCV思想: M是指数据模型,V是指用户界面,C则是控制器.使用MVC的目的是将M和V的实现代码分离,从而使同一个程序可以使用不同的表现形式.比如一批统计数据你可以分别用柱状图.饼图来表示.C存在的目 ...
- flink-training-course
目录 flink-training-course 大数据领域顶级盛会 Flink Forward Asia 2019 详情
- __attribute__ ((packed))字节对齐
1. __attribute__ ((packed)) 的作用就是告诉编译器取消结构在编译过程中的优化对齐,按照实际占用字节数进行对齐,是GCC特有的语法.这个功能是跟操作系统没关系,跟编译器有关,g ...
- USACO 2014 US Open Odometer /// 数位DP
题目大意: 给定区间 l r 求得区间中有多少个数 数的各个数位里出现最多次的数>=数的长度的一半 如2233 3334 枚举k在数中出现次数在一半以上 那么求出的所有方案数中应该减去 两个数各 ...
- 记录一次kibana启动Unable to fetch data from reporting collector
版本不匹配导致 应该es与kibana版本一致 本文链接:https://blog.csdn.net/qq_33293753/article/details/87894882
- VINS 回环检测与全局优化
回环检测 VINS回环检测与全局优化都在pose_graph.cpp内处理.首先在pose_graph_node加载vocabulary文件给BriefDatabase用,如果要加载地图,会loadP ...
- 数组归一 reduce (数组归一) reduceRight(从右至左)
var addTwoNumbers = function(l1, l2) { var e = l1 .reverse() .map((v, index, array) => v * Math.p ...
- 十万级百万级数据量的Excel文件导入并写入数据库
一.需求分析 最近接到一个需求,导入十万级,甚至可能百万数据量的记录了车辆黑名单的Excel文件,借此机会分析下编码过程; 首先将这个需求拆解,发现有三个比较复杂的问题: 问题一:Excel文件导入后 ...