xref: /MusicPlayer2/MusicPlayer2/OptionsDlg.h (revision 443d2d2511be730d1b1dd3181942b7fa6539aa1a)
1 #pragma once
2 #include "LyricSettingsDlg.h"
3 #include "AppearanceSettingDlg.h"
4 #include "DataSettingsDlg.h"
5 #include "PlaySettingsDlg.h"
6 #include "CTabCtrlEx.h"
7 #include "CHotKeySettingDlg.h"
8 #include "MediaLibSettingDlg.h"
9 #include "BaseDialog.h"
10 
11 // COptionsDlg 对话框
12 #define TIMER_ID2 1122
13 #define WM_SETTINGS_APPLIED (WM_USER+113)
14 
15 class COptionsDlg : public CBaseDialog
16 {
17 	DECLARE_DYNAMIC(COptionsDlg)
18 
19 public:
20 	COptionsDlg(CWnd* pParent = NULL);   // 标准构造函数
21 	virtual ~COptionsDlg();
22 
23 	CLyricSettingsDlg m_tab1_dlg{ this };		//“歌词设置”子对话框
24 	CAppearanceSettingDlg m_tab2_dlg{ this };	//“外观设置”子对话框
25 	CDataSettingsDlg m_tab3_dlg{ this };		//“常规设置”子对话框
26 	CPlaySettingsDlg m_tab4_dlg{ this };		//“播放选项”子对话框
27 	CHotKeySettingDlg m_tab5_dlg{ this };		//“全局快捷键”子对话框
28 	CMediaLibSettingDlg m_media_lib_dlg{ this };		//“媒体库”子对话框
29 
30 	int m_tab_selected{};
31 
32 // 对话框数据
33 #ifdef AFX_DESIGN_TIME
34 	enum { IDD = IDD_OPTIONS_DIALOG };
35 #endif
36 
37 protected:
38 
39 	CTabCtrlEx m_tab;		//选项卡控件
40     std::vector<CTabDlg*> m_tab_vect;
41     std::vector<int> m_tab_height;
42 
43     virtual CString GetDialogName() const override;
44     virtual bool InitializeControls() override;
45     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
46 
47 	DECLARE_MESSAGE_MAP()
48 public:
49 	virtual BOOL OnInitDialog();
50 	virtual void OnOK();
51 	afx_msg void OnBnClickedApplyButton();
52 	afx_msg void OnDestroy();
53     afx_msg void OnSize(UINT nType, int cx, int cy);
54 };
55