lyricdlg.h
来自「实现类似千千静听功能的播放器,采用MFC技术,在VC++6.0SP6中实现」· C头文件 代码 · 共 110 行
H
110 行
#if !defined(AFX_LYRICDLG_H__8799792B_FAD6_4AC3_B8C2_3C47B0B31778__INCLUDED_)
#define AFX_LYRICDLG_H__8799792B_FAD6_4AC3_B8C2_3C47B0B31778__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LyricDlg.h : header file
//
#include <fstream.h>
#define MAXCOUNT 100
/////////////////////////////////////////////////////////////////////////////
// CLyricDlg dialog
//关于星星的结构体
typedef struct _tagstar
{
int x; //星星出现的位置
int y;
int speed; //星星移动的速度
int size; //星星的大小
} STAR, *PSTAR;
//关于歌词的结构体
typedef struct _taglyric
{
int time; //出现的时间
CString strLyric; //歌词的内容
}LYRIC, *PLYRIC;
//歌词Dialog的声明
class CLyricDlg : public CDialog
{
// Construction
public:
void SetPlayListWnd(CWnd *pWnd);
CWnd *m_pPlaylistWnd;
BOOL fHideMain;
BOOL OpenLyric(CString strLyricPath, int nIndex);
void InvalidateCtrl(); //无效控制?
CBitmap *m_pOldBitmap;
CBitmap m_MainBitmap;
CDC m_MainDC;
CFont m_font;
void SlideClick();
int m_nCurrentLine;
void CountStep();
int nStep;
void SortLyric();
int nCounter;
int GetTime(CString strTime);
void AnalyseLine(CString strLine);
int m_nTotalLines;
LYRIC m_lyric[1000];
BOOL IsExistFile(CString strFileName);
BOOL OpenLyric(int nIndex);
BOOL fInited;
void GetLyric(CString strFileName);
void DrawText(CDC*pDC);
void InitStar();
void DrawStar(CDC*pDC,int nIndex);
void NewStar(int nIndex);
STAR m_star[MAXCOUNT];
void CleanScreen();
BOOL Create();
int m_nID;
CWnd* m_pParent;
CLyricDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CLyricDlg)
enum { IDD = IDD_LYRIC_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLyricDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CLyricDlg)
virtual void OnCancel();
virtual void OnOK();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
virtual BOOL OnInitDialog();
afx_msg void OnMove(int x, int y);
afx_msg void OnPaint();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnHideMain();
afx_msg void OnHideLyric();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LYRICDLG_H__8799792B_FAD6_4AC3_B8C2_3C47B0B31778__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?