|   版权声明:本文为博主原创文章,未经博主允许不得转载。

  

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---功能实现代码)的更多相关文章

  1. 基于MFC的Media Player播放器的制作(3---功能实现)

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 下面我们试试一下,按下退出Button退出播放器的功能: 首先,我们双击退出Button按钮,就会弹出下图的框: 上面的弄好之后我们就实现 ...

  2. 基于MFC的Media Player播放器的制作介绍

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 因为这次多媒体课程设计做一个基于MFC的播放器,因为本人实力太菜,需要播放音乐或视频文件时候,自己写不出解码 函数,所以准备使用第三方多媒 ...

  3. 基于MFC的Media Player播放器的制作(1---播放器界面的布局)

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 通过上面的一些预备知识,我们现在就可以自己来制作基于MFC的播放器了,接下来我们讲的是使用MFC制作我们播放器 的界面. 首先,我们我们打 ...

  4. 基于MFC的Media Player播放器的制作(2---导入第三方库和介绍第三方库)

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 这一节我们介绍如何导入类库,和介绍类库的一功能和介绍MFC的一些主要的模块部分.下面是如何导入类库.第一步我们选中 Media Playe ...

  5. 基于MFC的Media Player播放器的控件方法和属性介绍

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 因为使用第三方多媒体库或是第三方控件(Media Player)辅助播放,我们则必须要了解到Media Player控件的一些属性 和方法 ...

  6. 基于MFC的Media Player播放器制作的SetTimer函数介绍

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. SetTimer是一种API函数,位于user32.dll中.你想每隔一段时间执行一件事的的时候,你可以使用它. 使用定时器的方法比 较简 ...

  7. winform中的Windows Media Player播放器设置

    namespace WindowsMediaPlayer{ public partial class Form1 : Form { Form2 form2;//声明from2窗体 public For ...

  8. 最简单的基于FFMPEG+SDL的音频播放器 ver2 (采用SDL2.0)

    ===================================================== 最简单的基于FFmpeg的音频播放器系列文章列表: <最简单的基于FFMPEG+SDL ...

  9. 基于jQuery仿QQ音乐播放器网页版代码

    基于jQuery仿QQ音乐播放器网页版代码是一款黑色样式风格的网页QQ音乐播放器样式代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class="m ...

随机推荐

  1. Egyptian Collegiate Programming Contest 2017 (ACM ECPC 2017) - original tests edition

    题目链接:https://codeforces.com/gym/101856 D. Dream Team 题意:n个点,让你连边成为一棵树,边权为顶点的GCD(u,v).求所有边权和的最大值. 思路: ...

  2. create Excel file - snippet

    http://www.codepal.co.uk/show/Line_breaks_lost_and_br_tags_show_when_exporting_to_Excel_file  Protec ...

  3. redis缓存架构-01-缓存架构方案

    缓存实现架构 1.小型电商-页面静态化(基于url rewrite) 2.大型电商

  4. 分布式ID的雪花算法及坑

    分布式ID生成是目前系统的常见刚需,其中以Twitter的雪花算法(Snowflake)比较知名,有Java等各种语言的版本及各种改进版本,能生成满足分布式ID,返回ID为Long长整数 但是这里有一 ...

  5. 三、spring的AOP

    AOP的基本认识 Aspect Oriented Programming,面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术 利用AOP可以对业务逻辑的各个部分进行隔离,从而 ...

  6. java NIO 详解

    Java NIO(New IO)是从Java 1.4版本开始引入的一个新的IO API,可以替代标准的Java IO API.本系列教程将有助于你学习和理解Java NIO. Java NIO提供了与 ...

  7. go语言从例子开始之Example17.指针

    Go 支持 指针,允许在程序中通过引用传递值或者数据结构 Example: package main import "fmt" func zeroval(ival int){ iv ...

  8. Node.js的适用场景?

    1).实时应用:如在线聊天,实时通知推送等等(如socket.io) 2).分布式应用:通过高效的并行I/O使用已有的数据 3).工具类应用:海量的工具,小到前端压缩部署(如grunt),大到桌面图形 ...

  9. Repeater的使用

    1.页面代码 如果要分页,那么页面开头必须写(<%@ Register Src="~/Controls/Page.ascx" TagName="Page" ...

  10. com.alibaba.fastjson.JSON.parseObject

    Journal 日志实体 Journal journal = com.alibaba.fastjson.JSON.parseObject(jsonStr, new com.alibaba.fastjs ...