gps/GPSResources/tcpmp/MusicPlayer/MusicPlayerDlg.h

102 lines
2.2 KiB
C++
Executable File

// MusicPlayerDlg.h : 头文件
//
#include "BmpButton.h"
#include "BmpProgress.h"
#include "TcpmpPlayer.h"
#pragma once
// 定时器回调函数
void PlayerTimeProc(UINT uTimerID,UINT uMsg,DWORD_PTR dwUser,DWORD_PTR dw1,DWORD dw2);
void PlayerNotifyProc(LPVOID pForm, int Id, int Value);
// CMusicPlayerDlg 对话框
class CMusicPlayerDlg : public CDialog
{
private:
CDC m_BgDC;
CFont m_txtTimeFont;
CFont m_txtTitleFont;
CFont m_txtClipFont;
MMRESULT m_Timer;
bool m_InitDC;
CDC m_MemDC;
public:
UINT m_Volume;
CString m_CurrentFile;
CString m_CurrentTime;
CString m_CurentDuration;
CTcpmpPlayer m_TcpPlayer;
// 构造
public:
CMusicPlayerDlg(CWnd* pParent = NULL); // 标准构造函数
~CMusicPlayerDlg();
// 对话框数据
enum { IDD = IDD_MUSICPLAYER_DIALOG };
#ifdef WIN32_PLATFORM_WFSP
protected: // 控件条嵌入成员
CCommandBar m_dlgCommandBar;
#endif // WIN32_PLATFORM_WFSP
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
HICON m_hIcon;
// 生成的消息映射函数
virtual BOOL OnInitDialog();
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
afx_msg void OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/);
#endif
DECLARE_MESSAGE_MAP()
public:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
public:
afx_msg void OnPaint();
public:
CBmpButton m_butClose;
public:
afx_msg void OnBnClickedButtonClose();
public:
CBmpButton m_butPlay;
public:
afx_msg void OnBnClickedButtonPlaypause();
public:
CBmpButton m_butStop;
public:
afx_msg void OnBnClickedButtonStop();
public:
CBmpButton m_butPre;
public:
afx_msg void OnBnClickedButtonPre();
public:
CBmpButton m_butNext;
public:
afx_msg void OnBnClickedButtonNext();
public:
CBmpButton m_butAdd;
public:
CBmpButton m_butVolDec;
public:
CBmpButton m_butSound;
public:
afx_msg void OnBnClickedButtonSound();
public:
// 绘制音量
void DrawVolume(CDC* pDC);
public:
afx_msg void OnBnClickedButtonVoldec();
public:
afx_msg void OnBnClickedButtonVoladd();
public:
CString GetFileName(CString sPathName);
public:
CBmpProgress m_prgFile;
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
};