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 "PPageSheet.h"
00028
00029
00030
00031 IMPLEMENT_DYNAMIC(CPPageSheet, CTreePropSheet)
00032
00033 CPPageSheet::CPPageSheet(LPCTSTR pszCaption, IFilterGraph* pFG, CWnd* pParentWnd, UINT idPage)
00034 : CTreePropSheet(pszCaption, pParentWnd, 0)
00035 , m_audioswitcher(pFG)
00036 , m_mpegdecoder(pFG)
00037 , m_audiodecoder(pFG)
00038 {
00039 AddPage(&m_player);
00040 AddPage(&m_formats);
00041 AddPage(&m_acceltbl);
00042 AddPage(&m_logo);
00043 AddPage(&m_playback);
00044 AddPage(&m_dvd);
00045
00046 AddPage(&m_output);
00047 AddPage(&m_webserver);
00048 AddPage(&m_filters);
00049 AddPage(&m_audioswitcher);
00050 AddPage(&m_audiodecoder);
00051 AddPage(&m_mpegdecoder);
00052 AddPage(&m_overrides);
00053 AddPage(&m_subtitles);
00054 AddPage(&m_substyle);
00055 AddPage(&m_subdb);
00056 AddPage(&m_tweaks);
00057
00058 EnableStackedTabs(FALSE);
00059
00060 SetTreeViewMode(TRUE, TRUE, FALSE);
00061
00062 if(idPage || (idPage = AfxGetApp()->GetProfileInt(ResStr(IDS_R_SETTINGS), _T("LastUsedPage"), 0)))
00063 {
00064 for(int i = 0; i < GetPageCount(); i++)
00065 {
00066 if(GetPage(i)->m_pPSP->pszTemplate == MAKEINTRESOURCE(idPage))
00067 {
00068 SetActivePage(i);
00069 break;
00070 }
00071 }
00072 }
00073 }
00074
00075 CPPageSheet::~CPPageSheet()
00076 {
00077 }
00078
00079 CTreeCtrl* CPPageSheet::CreatePageTreeObject()
00080 {
00081 return new CTreePropSheetTreeCtrl();
00082 }
00083
00084 BEGIN_MESSAGE_MAP(CPPageSheet, CTreePropSheet)
00085 END_MESSAGE_MAP()
00086
00087 BOOL CPPageSheet::OnInitDialog()
00088 {
00089 BOOL bResult = __super::OnInitDialog();
00090
00091 if(CTreeCtrl* pTree = GetPageTreeControl())
00092 {
00093 for(HTREEITEM node = pTree->GetRootItem(); node; node = pTree->GetNextSiblingItem(node))
00094 pTree->Expand(node, TVE_EXPAND);
00095 }
00096
00097 return bResult;
00098 }
00099
00100
00101
00102 IMPLEMENT_DYNAMIC(CTreePropSheetTreeCtrl, CTreeCtrl)
00103 CTreePropSheetTreeCtrl::CTreePropSheetTreeCtrl()
00104 {
00105 }
00106
00107 CTreePropSheetTreeCtrl::~CTreePropSheetTreeCtrl()
00108 {
00109 }
00110
00111
00112 BEGIN_MESSAGE_MAP(CTreePropSheetTreeCtrl, CTreeCtrl)
00113 END_MESSAGE_MAP()
00114
00115
00116
00117
00118 BOOL CTreePropSheetTreeCtrl::PreCreateWindow(CREATESTRUCT& cs)
00119 {
00120 cs.dwExStyle |= WS_EX_CLIENTEDGE;
00121
00122
00123 return __super::PreCreateWindow(cs);
00124 }
00125