richimp3dlg.h

来自「完整的MP3播放器源码」· C头文件 代码 · 共 185 行

H
185
字号
// RichiMP3Dlg.h : header file
//

#if !defined(AFX_RICHIMP3DLG_H__8EC207ED_0A66_11D1_95CB_0000E8713613__INCLUDED_)
#define AFX_RICHIMP3DLG_H__8EC207ED_0A66_11D1_95CB_0000E8713613__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "bitmapdialog.h"
#include "filelistdlg.h"
#include "HorverSlider.h"
#include "VerSlider.h"
#include "BytesTracer.h"
#include "StaticCounter.h"
#include "WndGraph.h"
#include "EqDlg.h"
////////////////////////
#include "TheMci.h"
#include "LayerIII.h"
#include "TheFIle.h"
////////////////////
class CRichiMP3DlgAutoProxy;

/////////////////////////////////////////////////////////////////////////////
// CRichiMP3Dlg dialog

class CRichiMP3Dlg : public CBitmapDialog
{
	DECLARE_DYNAMIC(CRichiMP3Dlg);
	friend class CRichiMP3DlgAutoProxy;
public:
	CLayerIII* m_pDecoder;
public:
	static DWORD        DecCallback(double *pVal, double *pSpectrum,int nChannel);
	static int          PlayThread(void* pData);
    void                TheadFn();
    HANDLE              m_hThread;
    //HANDLE              m_killThread;
	static CWndGraph       *m_scope;
	static CBytesTracer	*m_ctrl1;
	static CBytesTracer	*m_ctrl2;
    int                 m_killThread;
    CRITICAL_SECTION    m_css;
	static double     m_preVol;
//	CToolTipWnd m_bttWnd;
// Construction
public:
	CRichiMP3Dlg(CWnd* pParent = NULL);	// standard constructor
	virtual ~CRichiMP3Dlg();

protected:
	CBitmapButton btnFirst;
	CBitmapButton btnForward;
	CBitmapButton btnPlay;
	CBitmapButton btnPause;

	CBitmapButton btnStop;
	CBitmapButton btnBack;
	CBitmapButton btnEnd;
	CBitmapButton btnLoop;
	CBitmapButton btnList;
	CBitmapButton btnEq;

	CBitmapButton btnTitle;

	CBitmapButton btnHelp;
	CBitmapButton btnAbout;
	CBitmapButton btnMin;
	CBitmapButton btnClose;
	CFileListDlg *pListDlg;
	
	CEqDlg *pEqDlg;
//	CWndGraph       m_scope;
public:
// Dialog Data
	//{{AFX_DATA(CRichiMP3Dlg)
	enum { IDD = IDD_RICHIMP3_DIALOG };
	CVerSlider	m_pre;
	CHorverSlider	m_fp;
	CStaticCounter	ef_b2;
	CStaticCounter	ef_b3;
	CDelListFiles	m_list;
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRichiMP3Dlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CRichiMP3DlgAutoProxy* m_pAutoProxy;
	HICON m_hIcon;
	void UpdateListBox1();
	BOOL CanExit();

	// Generated message map functions
	//{{AFX_MSG(CRichiMP3Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnButtonBack();
	afx_msg void OnButtonEnd();
	afx_msg void OnButtonFirst();
	afx_msg void OnButtonForward();
	afx_msg void OnButtonList();
	afx_msg void OnButtonLoop();
	afx_msg void OnButtonPause();
	afx_msg void OnButtonPlay();
	afx_msg void OnButtonStop();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnButtonClose();
	afx_msg void OnButtonAbout();
	afx_msg void OnButtonMin();
	afx_msg void OnButtonHelp();
	afx_msg void OnFileChange();
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnDestroy();
	afx_msg void OnSelchangeList2();
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnButtonList2();
	afx_msg void OnButtonTitle();
	//}}AFX_MSG
	afx_msg LRESULT OnIdUpdate(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnFilePlayed(WPARAM wp, LPARAM lp);
	LRESULT	OnVScroll1(WPARAM wp, LPARAM gains);
	afx_msg LRESULT OnFileChanged(WPARAM wp, LPARAM lp);
     void    StartPlay();
    BOOL    StopPlay();
    BOOL    StartPlay(LPCSTR pFileName);
	BOOL    ResetUI(BOOL bFromNoty = FALSE);
	DECLARE_MESSAGE_MAP()
	private:
	
    CString   m_nextFile;
    int     m_t;
    BOOL    m_play;
    BOOL    m_expand;
    BOOL    m_break;
	BOOL    bLoop;
	BOOL    bPause;
	BOOL    bStop;
    int     m_buffsize;
	UINT nCurPos;
    
    int     m_fppos;

	CTheFIle	m_pFile;
    CTheMci	    m_Mci;
    int         m_buffers;
    int         m_mod;    

	TCHAR		m_szout[32];

    DWORD		m_frmLength;
    DWORD       m_freq;
    DWORD       m_mode;
    DWORD       m_modeEx;
    DWORD       m_frqIdx;
    DWORD       m_version;
	BOOL		m_highProcSpeed;

	BOOL		m_ignoreMsg;
    int         m_playIdx;
	BOOL    StartThread(LPCSTR pFileName);
    BOOL    StopThread();
	int			m_pspf;
	int			m_about;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RICHIMP3DLG_H__8EC207ED_0A66_11D1_95CB_0000E8713613__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?