00001
00002
00003
00004 #pragma once
00005 #include "afxwin.h"
00006
00007 enum Action
00008 {
00009 None,
00010 Play,
00011 Stop,
00012 Next,
00013 Previous,
00014 Repeat,
00015 Random,
00016 VolumeUp,
00017 VolumeDown,
00018 AddMusic,
00019 Load,
00020 Save,
00021 EditPlayList
00022 };
00023
00024
00025
00026 class CsaMPDlg : public CDialog
00027 {
00028 private:
00029 Action m_CurrentAction;
00030 CMap<Action, Action, CRect, CRect> m_BtnList;
00031 PlayList m_PlayList;
00032
00033
00034 public:
00035 CsaMPDlg(CWnd* pParent = NULL);
00036
00037
00038 enum { IDD = IDD_SAMP_DIALOG };
00039
00040 protected:
00041 virtual void DoDataExchange(CDataExchange* pDX);
00042
00043
00044
00045 protected:
00046 HICON m_hIcon;
00047
00048
00049 virtual BOOL OnInitDialog();
00050 afx_msg void OnPaint();
00051 afx_msg HCURSOR OnQueryDragIcon();
00052 DECLARE_MESSAGE_MAP()
00053 public:
00054 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00055
00056 private:
00057 void InitButtonRect();
00058 void TestMousePosition(const CPoint& _Point);
00059 void LaunchAction();
00060 void PlayMusic();
00061 void StopMusic();
00062 void LoadMusic();
00063 CString LoadFileDialog(bool _OpenMode, bool _LoadMusic = true);
00064 void LaunchPlayListManager();
00065
00066 public:
00067 void SavePlayList();
00068 void LoadPlayList();
00069
00070 public:
00071 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00072 afx_msg void OnTimer(UINT_PTR nIDEvent);
00073 };