1 #pragma once 2 #include "PropertyTabDlg.h" 3 #include "CTabCtrlEx.h" 4 #include "BaseDialog.h" 5 #include "PropertyAlbumCoverDlg.h" 6 #include "PropertyAdvancedDlg.h" 7 8 9 // CPropertyDlg 对话框 10 11 class CPropertyDlg : public CBaseDialog 12 { 13 DECLARE_DYNAMIC(CPropertyDlg) 14 15 public: 16 CPropertyDlg(vector<SongInfo>& all_song_info, int index, bool read_only, int tab_index = 0, bool show_out_album_cover = false, CWnd* pParent = nullptr); // 标准构造函数 17 CPropertyDlg(vector<SongInfo>& all_song_info, CWnd* pParent = nullptr); // 批量编辑 18 virtual ~CPropertyDlg(); 19 20 bool GetListRefresh() const; 21 bool GetModified() const; 22 23 // 对话框数据 24 #ifdef AFX_DESIGN_TIME 25 enum { IDD = IDD_PROPERTY_PARENT_DIALOG }; 26 #endif 27 28 protected: 29 CTabCtrlEx m_tab_ctrl; 30 CPropertyTabDlg m_property_dlg; 31 CPropertyAlbumCoverDlg m_album_cover_dlg; 32 CPropertyAdvancedDlg m_advanced_dlg; 33 CButton m_save_btn; 34 CButton m_previous_btn; 35 CButton m_next_btn; 36 37 int m_index{}; //当前显示项目的曲目序号 38 bool m_read_only{}; 39 int m_song_num; 40 int m_tab_index{}; 41 const int m_batch_edit; 42 bool m_modified{}; //如果点击过“保存到文件”,则为true 43 44 protected: 45 void ShowPageNum(); 46 47 virtual CString GetDialogName() const override; 48 virtual bool InitializeControls() override; 49 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 50 51 DECLARE_MESSAGE_MAP() 52 public: 53 virtual BOOL OnInitDialog(); 54 afx_msg void OnBnClickedSaveToFileButton(); 55 afx_msg void OnBnClickedPreviousButton(); 56 afx_msg void OnBnClickedNextButton(); 57 protected: 58 afx_msg LRESULT OnPropertyDialogModified(WPARAM wParam, LPARAM lParam); 59 public: 60 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); 61 virtual BOOL PreTranslateMessage(MSG* pMsg); 62 }; 63