| 版权声明:本文为博主原创文章,未经博主允许不得转载。
PandaPlayerDlg.h
1 // PandaPlayerDlg.h : header file 2 // 3 //{{AFX_INCLUDES() 4 #include "wmpplayer4.h" 5 #include "wmpcontrols.h" 6 #include "wmpsettings.h" 7 //}}AFX_INCLUDES 8 9 #if !defined(AFX_PANDAPLAYERDLG_H__BD44EB72_E7B8_4CCE_831C_6781A9FDFD2B__INCLUDED_) 10 #define AFX_PANDAPLAYERDLG_H__BD44EB72_E7B8_4CCE_831C_6781A9FDFD2B__INCLUDED_ 11 12 #if _MSC_VER > 1000 13 #pragma once 14 #endif // _MSC_VER > 1000 15 16 ///////////////////////////////////////////////////////////////////////////// 17 // CPandaPlayerDlg dialog 18 19 class CPandaPlayerDlg : public CDialog 20 { 21 // Construction 22 public: 23 CPandaPlayerDlg(CWnd* pParent = NULL); // standard constructor 24 25 //文件关联对象的变量声明 26 CWMPControls setControl; 27 CWMPSettings setVolume; 28 CSliderCtrl *pSlidCtrl; 29 CSliderCtrl sliderVolume; 30 31 32 // Dialog Data 33 //{{AFX_DATA(CPandaPlayerDlg) 34 enum { IDD = IDD_PANDAPLAYER_DIALOG }; 35 CWMPPlayer4 m_ActiveMovie; 36 //}}AFX_DATA 37 38 // ClassWizard generated virtual function overrides 39 //{{AFX_VIRTUAL(CPandaPlayerDlg) 40 protected: 41 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 42 //}}AFX_VIRTUAL 43 44 // Implementation 45 protected: 46 HICON m_hIcon; 47 48 void listDisplay(CString a[]); 49 50 // Generated message map functions 51 //{{AFX_MSG(CPandaPlayerDlg) 52 virtual BOOL OnInitDialog(); 53 afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 54 afx_msg void OnPaint(); 55 afx_msg HCURSOR OnQueryDragIcon(); 56 afx_msg void OnExit(); 57 afx_msg void OnFullscreen(); 58 afx_msg void OnOpen(); 59 afx_msg void OnPlay(); 60 afx_msg void OnPause(); 61 afx_msg void OnStop(); 62 afx_msg void OnGo(); 63 afx_msg void OnBack(); 64 afx_msg void OnAbout(); 65 afx_msg void OnOpenfiles(); 66 afx_msg void OnMute(); 67 afx_msg void OnLower(); 68 afx_msg void OnUpper(); 69 afx_msg void OnOutofmemoryVolumeslider(); 70 afx_msg void OnNext(); 71 afx_msg void OnPrevious(); 72 afx_msg void OnLoop(); 73 afx_msg void OnOrder(); 74 afx_msg void OnRandom(); 75 afx_msg void OnTimer(UINT nIDEvent); 76 afx_msg void OnFullscr(); 77 afx_msg void OnOnlyplay(); 78 //}}AFX_MSG 79 DECLARE_MESSAGE_MAP() 80 }; 81 82 //{{AFX_INSERT_LOCATION}} 83 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 84 85 #endif // !defined(AFX_PANDAPLAYERDLG_H__BD44EB72_E7B8_4CCE_831C_6781A9FDFD2B__INCLUDED_)
PandaPlayerDlg.cpp
1 // PandaPlayerDlg.cpp : implementation file 2 // 3 4 #include "stdafx.h" 5 #include "PandaPlayer.h" 6 #include "PandaPlayerDlg.h" 7 8 #ifdef _DEBUG 9 #define new DEBUG_NEW 10 #undef THIS_FILE 11 static char THIS_FILE[] = __FILE__; 12 #endif 13 14 //文件数组大小预定义 15 #define N 100 16 17 //全局变量声明 18 static int count = 0; 19 static int times = 0; 20 static int modelFlag = 0; 21 static int flag = 0; 22 23 //0表示 24 static int playStatus = 1; 25 static int pauseStatus = 0; 26 static int stopStatus = 0; 27 28 static int volumeSlider = 0; 29 static long maxVloume = 0; 30 static bool listFlag = true; 31 CString filesPath[N] = {"