// MediaPlayerDlg.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); // CMediaPlayerDlg 对话框 class CMediaPlayerDlg : public CDialog { private: CDC m_BgDC; CFont m_txtTimeFont; MMRESULT m_Timer; bool m_InitDC; CDC m_MemDC; CBrush m_blackBrush; BOOL m_RefreshWnd; public: UINT m_Volume; CString m_CurrentTime; CString m_CurrentFile; CString m_CurentDuration; CTcpmpPlayer m_TcpPlayer; // 构造 public: CMediaPlayerDlg(CWnd* pParent = NULL); // 标准构造函数 ~CMediaPlayerDlg(); // 对话框数据 enum { IDD = IDD_MEDIAPLAYER_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 void OnPaint(); public: afx_msg BOOL OnEraseBkgnd(CDC* pDC); public: // 绘制音量 void DrawVolume(CDC* pDC); public: afx_msg void OnBnClickedButtonPlay(); public: CBmpButton m_butAdd; CBmpButton m_butVolDec; CBmpButton m_butSound; CBmpButton m_butClose; CBmpButton m_butPlay; CBmpButton m_butStop; CBmpButton m_butPre; CBmpButton m_butNext; CBmpButton m_butFull; CBmpProgress m_prgVol; public: afx_msg void OnBnClickedButtonStop(); public: afx_msg void OnBnClickedButtonPre(); public: afx_msg void OnBnClickedButtonNext(); public: afx_msg void OnBnClickedButtonFull(); public: afx_msg void OnBnClickedButtonVolume(); public: afx_msg void OnBnClickedButtonAddvol(); public: afx_msg void OnBnClickedButtonDecvol(); public: afx_msg void OnBnClickedButtonClose(); public: CString GetFileName(CString sPathName); public: afx_msg void OnLButtonDown(UINT nFlags, CPoint point); public: // afx_msg void OnStnClickedStaticVideo(); public: // afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); public: void RefreshControl(void); };