// VlcPlayerCsdnDlg.cpp: 实现文件
//
#include "stdafx.h"
#include "VlcPlayerCsdn.h"
#include "VlcPlayerCsdnDlg.h"
#include "afxdialogex.h"
#include "vlc.h"
#pragma comment(lib, "libvlc.lib")
#pragma comment(lib, "libvlccore.lib")
//#define WIN32_LEAN_AND_MEAN
#define WM_USER_POS_CHANGED WM_USER + 1
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_ABOUTBOX };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()
// CVlcPlayerCsdnDlg 对话框
CVlcPlayerCsdnDlg::CVlcPlayerCsdnDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_VLCPLAYERCSDN_DIALOG, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CVlcPlayerCsdnDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_LIST_PLAY, m_listPlay);
DDX_Control(pDX, IDC_LIST_MUSINFO, m_listInfo);
DDX_Control(pDX, IDC_SLIDER1, m_slider);
}
BEGIN_MESSAGE_MAP(CVlcPlayerCsdnDlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BUTTON_PLAY, &CVlcPlayerCsdnDlg::OnBnClickedButtonPlay)
ON_WM_DROPFILES()
ON_LBN_DBLCLK(IDC_LIST_PLAY, &CVlcPlayerCsdnDlg::OnDblclkListPlay)
ON_MESSAGE(WM_USER_POS_CHANGED, OnPosChanged)
ON_WM_HSCROLL()
ON_STN_DBLCLK(IDC_PLAY, &CVlcPlayerCsdnDlg::OnDblclkPlay)
ON_BN_CLICKED(IDC_BUTTON_UP, &CVlcPlayerCsdnDlg::OnBnClickedButtonUp)
ON_BN_CLICKED(IDC_BUTTON_DOWN, &CVlcPlayerCsdnDlg::OnBnClickedButtonDown)
ON_BN_CLICKED(IDC_BUTTON_FORWARD, &CVlcPlayerCsdnDlg::OnBnClickedButtonForward)
ON_BN_CLICKED(IDC_BUTTON_BACKWARD, &CVlcPlayerCsdnDlg::OnBnClickedButtonBackward)
ON_BN_CLICKED(IDC_BUTTON_SHOWLIST, &CVlcPlayerCsdnDlg::OnBnClickedButtonShowlist)
END_MESSAGE_MAP()
void CallbackPosChanged(void *data, int iPos)
{
CAVPlayer *pAVPlayer = (CAVPlayer *)data;
if (pAVPlayer)
{
HWND hWnd = pAVPlayer->GetHWND();
if (::IsWindow(hWnd) && ::IsWindow(::GetParent(hWnd)))
{
::PostMessage(::GetParent(hWnd), WM_USER_POS_CHANGED, (WPARAM)data, iPos);
}
}
}
CStringA UnicodeToUTF8(const CStringW& strWide)
{
CStringA strUTF8;
int nLen = ::WideCharToMultiByte(CP_UTF8, 0, strWide, -1, NULL, 0, NULL, NULL);
if (nLen > 1)
{
::WideCharToMultiByte(CP_UTF8, 0, strWide, -1, strUTF8.GetBuffer(nLen - 1), nLen, NULL, NULL);
strUTF8.ReleaseBuffer();
}
return strUTF8;
}
void CVlcPlayerCsdnDlg::ShowPlaylist(BOOL bShow)
{
CRect rcWnd, rcPlaylist;
GetWindowRect(&rcWnd);
m_listPlay.GetClientRect(&rcPlaylist);
if (m_listPlay.IsWindowVisible() != bShow) // 只有显示状态发生变化时,才调整窗口大小
{
if (bShow)
{
SetWindowPos(NULL, 0, 0, rcWnd.Width() + rcPlaylist.Width(), rcWnd.Height(), SWP_NOMOVE);
}
else
{
SetWindowPos(NULL, 0, 0, rcWnd.Width() - rcPlaylist.Width(), rcWnd.Height(), SWP_NOMOVE);
}
}
m_listPlay.ShowWindow(bShow ? SW_SHOW : SW_HIDE);
m_listInfo.ShowWindow(bShow ? SW_SHOW : SW_HIDE);
}
void EnumerateFiles(CStringArray &strArray)
{
WIN32_FIND_DATA fd;
HANDLE hFind = ::FindFirstFile(_T("*.*"), &fd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
// 如果为目录
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
// 如果不为当前目录.或上一层目录..
if (_tcscmp(fd.cFileName, _T(".")) && _tcscmp(fd.cFileName, _T("..")))
{
::SetCurrentDirectory(fd.cFileName); // 进入该目录
EnumerateFiles(strArray); // 递归枚举
::SetCurrentDirectory(_T("..")); // 返回该目录上一层目录
}
}
// 如果为文件
else
{
CString strDir;
TCHAR lpDir[MAX_PATH]�
没有合适的资源?快使用搜索试试~ 我知道了~
VlcPlayerCsdn-全屏显示以及按钮函数的实现
共763个文件
dll:602个
h:93个
tlog:19个
3星 · 超过75%的资源 需积分: 50 68 下载量 77 浏览量
2018-12-28
20:34:45
上传
评论 1
收藏 215.01MB ZIP 举报
温馨提示
MFC 基于VLC的视频播放器(五)---全屏显示以及按钮函数的实现 https://blog.csdn.net/Jonh_/article/details/85327683
资源推荐
资源详情
资源评论
收起资源包目录
VlcPlayerCsdn-全屏显示以及按钮函数的实现 (763个子文件)
VlcPlayerCsdn.aps 107KB
VlcPlayerCsdnDlg.cpp 27KB
AVPlayer.cpp 5KB
VlcPlayerCsdn.cpp 4KB
stdafx.cpp 236B
plugins.dat 250KB
plugins.dat 250KB
Browse.VC.db 76.09MB
libqt4_plugin.dll 11.21MB
libqt4_plugin.dll 11.21MB
libavcodec_plugin.dll 9.52MB
libavcodec_plugin.dll 9.52MB
libvlccore.dll 2.23MB
libvlccore.dll 2.23MB
libvlccore.dll 2.23MB
libgnutls_plugin.dll 2.01MB
libgnutls_plugin.dll 2.01MB
liblibbluray_plugin.dll 1.94MB
liblibbluray_plugin.dll 1.94MB
libskins2_plugin.dll 1.87MB
libskins2_plugin.dll 1.87MB
libvorbis_plugin.dll 1.64MB
libvorbis_plugin.dll 1.64MB
libzvbi_plugin.dll 1.48MB
libzvbi_plugin.dll 1.48MB
libsamplerate_plugin.dll 1.45MB
libsamplerate_plugin.dll 1.45MB
libprojectm_plugin.dll 1.39MB
libprojectm_plugin.dll 1.39MB
libtaglib_plugin.dll 1.34MB
libtaglib_plugin.dll 1.34MB
liblibass_plugin.dll 1.32MB
liblibass_plugin.dll 1.32MB
libx264_plugin.dll 1.28MB
libx264_plugin.dll 1.28MB
libschroedinger_plugin.dll 1.24MB
libschroedinger_plugin.dll 1.24MB
libxml_plugin.dll 1.22MB
libxml_plugin.dll 1.22MB
libmkv_plugin.dll 1.11MB
libmkv_plugin.dll 1.11MB
libsid_plugin.dll 890KB
libsid_plugin.dll 890KB
libcaca_plugin.dll 751KB
libcaca_plugin.dll 751KB
libstream_out_chromaprint_plugin.dll 737KB
libstream_out_chromaprint_plugin.dll 737KB
libfreetype_plugin.dll 715KB
libfreetype_plugin.dll 715KB
libdash_plugin.dll 703KB
libdash_plugin.dll 703KB
liblive555_plugin.dll 610KB
liblive555_plugin.dll 610KB
libswscale_plugin.dll 529KB
libswscale_plugin.dll 529KB
libstream_out_rtp_plugin.dll 495KB
libstream_out_rtp_plugin.dll 495KB
libmod_plugin.dll 491KB
libmod_plugin.dll 491KB
libhttplive_plugin.dll 455KB
libhttplive_plugin.dll 455KB
libaccess_output_shout_plugin.dll 430KB
libaccess_output_shout_plugin.dll 430KB
librtp_plugin.dll 423KB
librtp_plugin.dll 423KB
libremoteosd_plugin.dll 418KB
libremoteosd_plugin.dll 418KB
libstream_out_raop_plugin.dll 415KB
libstream_out_raop_plugin.dll 415KB
libaccess_output_livehttp_plugin.dll 412KB
libaccess_output_livehttp_plugin.dll 412KB
libgme_plugin.dll 394KB
libgme_plugin.dll 394KB
libupnp_plugin.dll 370KB
libupnp_plugin.dll 370KB
libfaad_plugin.dll 351KB
libfaad_plugin.dll 351KB
libtheora_plugin.dll 343KB
libtheora_plugin.dll 343KB
libopus_plugin.dll 304KB
libopus_plugin.dll 304KB
liblua_plugin.dll 293KB
liblua_plugin.dll 293KB
libpng_plugin.dll 286KB
libpng_plugin.dll 286KB
libdvdnav_plugin.dll 253KB
libdvdnav_plugin.dll 253KB
libdshow_plugin.dll 241KB
libdshow_plugin.dll 241KB
libgoom_plugin.dll 234KB
libgoom_plugin.dll 234KB
libdtv_plugin.dll 211KB
libdtv_plugin.dll 211KB
libflac_plugin.dll 205KB
libflac_plugin.dll 205KB
libatmo_plugin.dll 190KB
libatmo_plugin.dll 190KB
libmp4_plugin.dll 188KB
libmp4_plugin.dll 188KB
libdeinterlace_plugin.dll 184KB
共 763 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
- hgftiger2020-10-03可以学习下。
Tom那只猫
- 粉丝: 54
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功