基于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 ...
随机推荐
- Mr. Panda and Crystal(最短路+完全背包)
http://codeforces.com/gym/101206/attachments 题意: T组输入,每组给出m,n,k,m为能量总数,n为水晶种类数,k为合成方案数.有的水晶可以用能量制造,有 ...
- 循环神经网络(RNN)入门介绍
循环神经⽹络是为更好地处理时序信息而设计的.它引⼊状态变量来存储过去的信息,并⽤其与当前的输⼊共同决定当前的输出.循环神经⽹络常⽤于处理序列数据,如⼀段⽂字或声⾳.购物或观影的顺序,甚⾄是图像中的⼀⾏ ...
- five hundred miles
- Python的基本数据类型,用户交互
整数: int 常见的数字都是int类型. 用于计算或者大小的比较 在32位机器上int的范围是: -2**31-2**31-1,即-2147483648-2147483647 在64位机器上int的 ...
- 同一台机器上有多个Python版本?
有关Python网站上的官方文档,如何在Linux上的同一台机器上安装和运行多个版本的Python? 我可以找到大量的博客帖子和答案,但我想知道是否有“标准”官方方式这样做? 或者这完全取决于操作系统 ...
- [Fw]中断的初始化
要使用中断肯定得初始化,这些初始化在系统启动时已经为你做好了,但是我们还是来看看怎样初始化的,这样就能更好的理解中断机制了.先看下面函数: 355 void __init init_ISA_irqs ...
- [Git 系列] WIN7下Git的安装
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/monkey7777/article/details/32155833 1.下载git win7版本号 ...
- mybatis默认的数据源连接池(PooledDataSource和UnPooledDataSource)
一般情况下我们操作数据库都是通过connection,但是频繁创建和删除connection会严重影响效率,因此在这种情况下我们一般会用到连接池,因为项目中用到的是mybatis,所以了解一下myba ...
- Java开发中的23种设计模式详解(2)结构型
我们接着讨论设计模式,上篇文章我讲完了5种创建型模式,这章开始,我将讲下7种结构型模式:适配器模式.装饰模式.代理模式.外观模式.桥接模式.组合模式.享元模式.其中对象的适配器模式是各种模式的起源,我 ...
- elasticsearch 中的Multi Match Query
在Elasticsearch全文检索中,我们用的比较多的就是Multi Match Query,其支持对多个字段进行匹配.Elasticsearch支持5种类型的Multi Match,我们一起来深入 ...