PPageSheet.cpp

00001 /* 
00002  *      Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 // PPageSheet.cpp : implementation file
00023 //
00024 
00025 #include "stdafx.h"
00026 #include "mplayerc.h"
00027 #include "PPageSheet.h"
00028 
00029 // CPPageSheet
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 //      AddPage(&m_realmediaquicktime);
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 // CTreePropSheetTreeCtrl
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 // CTreePropSheetTreeCtrl message handlers
00116 
00117 
00118 BOOL CTreePropSheetTreeCtrl::PreCreateWindow(CREATESTRUCT& cs)
00119 {
00120         cs.dwExStyle |= WS_EX_CLIENTEDGE;
00121 //      cs.style &= ~TVS_LINESATROOT;
00122 
00123         return __super::PreCreateWindow(cs);
00124 }
00125 

Generated on Tue Dec 13 14:47:02 2005 for guliverkli by  doxygen 1.4.5