xref: /MusicPlayer2/MusicPlayer2/PropertyAdvancedDlg.h (revision 86e2c9c227ea58a4f87dda2d9ffa8cbe422b3071)
1 #pragma once
2 #include "IPropertyTabDlg.h"
3 #include "ListCtrlEx.h"
4 
5 // CPropertyAdvancedDlg 对话框
6 
7 class CPropertyAdvancedDlg : public CTabDlg, public IPropertyTabDlg
8 {
9 	DECLARE_DYNAMIC(CPropertyAdvancedDlg)
10 
11 public:
12 	CPropertyAdvancedDlg(vector<SongInfo>& all_song_info, int& index, CWnd* pParent = nullptr);   // 标准构造函数
13 	CPropertyAdvancedDlg(vector<SongInfo>& all_song_info, CWnd* pParent = nullptr);   // 标准构造函数
14 	virtual ~CPropertyAdvancedDlg();
15 
16 // 对话框数据
17 #ifdef AFX_DESIGN_TIME
18 	enum { IDD = IDD_PROPERTY_ADVANCED_DIALOG };
19 #endif
20 
21 public:
22     void AdjustColumnWidth();
23 
24 protected:
25     int& m_index;		//当前显示项目的曲目序号
26     vector<SongInfo>& m_all_song_info;
27     const bool m_batch_edit;
28     int m_no_use{};
29 
30     CListCtrlEx m_list_ctrl;
31     wstring m_selected_string;
32     int m_item_selected{ -1 };
33 
34 protected:
35     virtual int SaveModified() override;
36     virtual void PagePrevious() override;
37     virtual void PageNext() override;
38     virtual void OnTabEntered() override;      //当标签切换到当前窗口时被调用
39 
40     const SongInfo& CurrentSong();      //当前查看的歌曲信息
41     void ShowInfo();
42 
43 protected:
44 	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
45 
46 	DECLARE_MESSAGE_MAP()
47 public:
48     virtual BOOL OnInitDialog();
49     afx_msg void OnCopyText();
50     afx_msg void OnNMRClickList1(NMHDR *pNMHDR, LRESULT *pResult);
51     afx_msg void OnInitMenu(CMenu* pMenu);
52     afx_msg void OnCopyAllText();
53 };
54