00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "stdafx.h"
00026 #include "mplayerc.h"
00027 #include "PPageTweaks.h"
00028
00029
00030
00031 IMPLEMENT_DYNAMIC(CPPageTweaks, CPPageBase)
00032 CPPageTweaks::CPPageTweaks()
00033 : CPPageBase(CPPageTweaks::IDD, CPPageTweaks::IDD)
00034 , m_fDisabeXPToolbars(FALSE)
00035 , m_fUseWMASFReader(FALSE)
00036 , m_nJumpDistS(0)
00037 , m_nJumpDistM(0)
00038 , m_nJumpDistL(0)
00039 , m_fFreeWindowResizing(TRUE)
00040 , m_fNotifyMSN(TRUE)
00041 {
00042 m_fWMASFReader = SUCCEEDED(CComPtr<IBaseFilter>().CoCreateInstance(
00043 GUIDFromCString(_T("{187463A0-5BB7-11D3-ACBE-0080C75E246E}"))));
00044 }
00045
00046 CPPageTweaks::~CPPageTweaks()
00047 {
00048 }
00049
00050 void CPPageTweaks::DoDataExchange(CDataExchange* pDX)
00051 {
00052 __super::DoDataExchange(pDX);
00053 DDX_Check(pDX, IDC_CHECK3, m_fDisabeXPToolbars);
00054 DDX_Control(pDX, IDC_CHECK3, m_fDisabeXPToolbarsCtrl);
00055 DDX_Check(pDX, IDC_CHECK2, m_fUseWMASFReader);
00056 DDX_Control(pDX, IDC_CHECK2, m_fUseWMASFReaderCtrl);
00057 DDX_Text(pDX, IDC_EDIT1, m_nJumpDistS);
00058 DDX_Text(pDX, IDC_EDIT2, m_nJumpDistM);
00059 DDX_Text(pDX, IDC_EDIT3, m_nJumpDistL);
00060 DDX_Check(pDX, IDC_CHECK1, m_fFreeWindowResizing);
00061 DDX_Check(pDX, IDC_CHECK4, m_fNotifyMSN);
00062 }
00063
00064 BOOL CPPageTweaks::OnInitDialog()
00065 {
00066 __super::OnInitDialog();
00067
00068 AppSettings& s = AfxGetAppSettings();
00069
00070 m_fDisabeXPToolbars = s.fDisabeXPToolbars;
00071 m_fUseWMASFReader = s.fUseWMASFReader;
00072 m_nJumpDistS = s.nJumpDistS;
00073 m_nJumpDistM = s.nJumpDistM;
00074 m_nJumpDistL = s.nJumpDistL;
00075 m_fFreeWindowResizing = s.fFreeWindowResizing;
00076 m_fNotifyMSN = s.fNotifyMSN;
00077
00078 UpdateData(FALSE);
00079
00080 return TRUE;
00081
00082 }
00083
00084 BOOL CPPageTweaks::OnApply()
00085 {
00086 UpdateData();
00087
00088 AppSettings& s = AfxGetAppSettings();
00089
00090 s.fDisabeXPToolbars = !!m_fDisabeXPToolbars;
00091 s.fUseWMASFReader = !!m_fUseWMASFReader;
00092 s.nJumpDistS = m_nJumpDistS;
00093 s.nJumpDistM = m_nJumpDistM;
00094 s.nJumpDistL = m_nJumpDistL;
00095 s.fFreeWindowResizing = m_fFreeWindowResizing;
00096 s.fNotifyMSN = m_fNotifyMSN;
00097
00098 return __super::OnApply();
00099 }
00100
00101 BEGIN_MESSAGE_MAP(CPPageTweaks, CPPageBase)
00102 ON_UPDATE_COMMAND_UI(IDC_CHECK3, OnUpdateCheck3)
00103 ON_UPDATE_COMMAND_UI(IDC_CHECK2, OnUpdateCheck2)
00104 ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
00105 END_MESSAGE_MAP()
00106
00107
00108
00109
00110 void CPPageTweaks::OnUpdateCheck3(CCmdUI* pCmdUI)
00111 {
00112 if(!AfxGetAppSettings().fXpOrBetter)
00113 {
00114 pCmdUI->Enable(FALSE);
00115 pCmdUI->SetCheck(TRUE);
00116 }
00117 }
00118
00119 void CPPageTweaks::OnUpdateCheck2(CCmdUI* pCmdUI)
00120 {
00121 pCmdUI->Enable(m_fWMASFReader);
00122 }
00123
00124 void CPPageTweaks::OnBnClickedButton1()
00125 {
00126 m_nJumpDistS = 1000;
00127 m_nJumpDistM = 5000;
00128 m_nJumpDistL = 20000;
00129
00130 UpdateData(FALSE);
00131 }
00132
00133