1 // OptionsDlg.cpp : ʵ���ļ� 2 // 3 4 #include "stdafx.h" 5 #include "MusicPlayer2.h" 6 #include "OptionsDlg.h" 7 #include "afxdialogex.h" 8 9 10 // COptionsDlg �Ի��� 11 12 IMPLEMENT_DYNAMIC(COptionsDlg, CDialog) 13 14 COptionsDlg::COptionsDlg(CWnd* pParent /*=NULL*/) 15 : CDialog(IDD_OPTIONS_DIALOG, pParent) 16 { 17 18 } 19 20 COptionsDlg::~COptionsDlg() 21 { 22 } 23 24 void COptionsDlg::DoDataExchange(CDataExchange* pDX) 25 { 26 CDialog::DoDataExchange(pDX); 27 DDX_Control(pDX, IDC_OPTIONS_TAB, m_tab); 28 } 29 30 31 BEGIN_MESSAGE_MAP(COptionsDlg, CDialog) 32 ON_BN_CLICKED(IDC_APPLY_BUTTON, &COptionsDlg::OnBnClickedApplyButton) 33 ON_WM_DESTROY() 34 END_MESSAGE_MAP() 35 36 37 // COptionsDlg ��Ϣ������� 38 39 40 BOOL COptionsDlg::OnInitDialog() 41 { 42 CDialog::OnInitDialog(); 43 44 // TODO: �ڴ���Ӷ���ij�ʼ�� 45 46 //�����ӶԻ��� 47 m_tab1_dlg.Create(IDD_LYRIC_SETTING_DIALOG); 48 m_tab2_dlg.Create(IDD_APPEREANCE_SETTING_DLG); 49 m_tab3_dlg.Create(IDD_DATA_SETTINGS_DIALOG); 50 m_tab4_dlg.Create(IDD_PLAY_SETTING_DIALOG); 51 m_tab5_dlg.Create(IDD_HOT_KEY_SETTINGS_DIALOG); 52 53 //��ӶԻ��� 54 m_tab.AddWindow(&m_tab1_dlg, CCommon::LoadText(IDS_LYRIC_SETTINGS)); 55 m_tab.AddWindow(&m_tab2_dlg, CCommon::LoadText(IDS_APPEARANCE_SETTINGS)); 56 m_tab.AddWindow(&m_tab3_dlg, CCommon::LoadText(IDS_GENERAL_SETTINGS)); 57 m_tab.AddWindow(&m_tab4_dlg, CCommon::LoadText(IDS_PLAY_SETTINGS)); 58 m_tab.AddWindow(&m_tab5_dlg, CCommon::LoadText(IDS_GLOBLE_HOTKEY)); 59 60 m_tab.SetCurTab(m_tab_selected); 61 62 return TRUE; // return TRUE unless you set the focus to a control 63 // �쳣: OCX ����ҳӦ���� FALSE 64 } 65 66 void COptionsDlg::OnOK() 67 { 68 // TODO: �ڴ����ר�ô����/����û��� 69 m_tab2_dlg.OnOK(); 70 m_tab3_dlg.OnOK(); 71 72 CDialog::OnOK(); 73 } 74 75 76 void COptionsDlg::OnBnClickedApplyButton() 77 { 78 // TODO: �ڴ���ӿؼ�֪ͨ���������� 79 ::SendMessage(theApp.m_pMainWnd->GetSafeHwnd(), WM_SETTINGS_APPLIED, (WPARAM)this, 0); 80 } 81 82 83 void COptionsDlg::OnDestroy() 84 { 85 CDialog::OnDestroy(); 86 87 // TODO: �ڴ˴������Ϣ���������� 88 m_tab_selected = m_tab.GetCurSel(); 89 } 90