Support unrar64.dll
[xy_vsfilter.git] / src / apps / mplayerc / PPageSheet.cpp
blobeae7fc2dac5ece44cd8207139538b37fc692a979
1 /*
2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
22 // PPageSheet.cpp : implementation file
25 #include "stdafx.h"
26 #include "mplayerc.h"
27 #include "PPageSheet.h"
29 // CPPageSheet
31 IMPLEMENT_DYNAMIC(CPPageSheet, CTreePropSheet)
33 CPPageSheet::CPPageSheet(LPCTSTR pszCaption, IFilterGraph* pFG, CWnd* pParentWnd, UINT idPage)
34 : CTreePropSheet(pszCaption, pParentWnd, 0)
35 , m_audioswitcher(pFG)
37 AddPage(&m_player);
38 AddPage(&m_formats);
39 AddPage(&m_acceltbl);
40 AddPage(&m_logo);
41 AddPage(&m_playback);
42 AddPage(&m_dvd);
43 AddPage(&m_output);
44 AddPage(&m_webserver);
45 AddPage(&m_internalfilters);
46 AddPage(&m_audioswitcher);
47 AddPage(&m_externalfilters);
48 AddPage(&m_subtitles);
49 AddPage(&m_substyle);
50 AddPage(&m_subdb);
51 AddPage(&m_tweaks);
53 EnableStackedTabs(FALSE);
55 SetTreeViewMode(TRUE, TRUE, FALSE);
57 if(idPage || (idPage = AfxGetApp()->GetProfileInt(ResStr(IDS_R_SETTINGS), _T("LastUsedPage"), 0)))
59 for(int i = 0; i < GetPageCount(); i++)
61 if(GetPage(i)->m_pPSP->pszTemplate == MAKEINTRESOURCE(idPage))
63 SetActivePage(i);
64 break;
70 CPPageSheet::~CPPageSheet()
74 CTreeCtrl* CPPageSheet::CreatePageTreeObject()
76 return new CTreePropSheetTreeCtrl();
79 BEGIN_MESSAGE_MAP(CPPageSheet, CTreePropSheet)
80 END_MESSAGE_MAP()
82 BOOL CPPageSheet::OnInitDialog()
84 BOOL bResult = __super::OnInitDialog();
86 if(CTreeCtrl* pTree = GetPageTreeControl())
88 for(HTREEITEM node = pTree->GetRootItem(); node; node = pTree->GetNextSiblingItem(node))
89 pTree->Expand(node, TVE_EXPAND);
92 return bResult;
95 // CTreePropSheetTreeCtrl
97 IMPLEMENT_DYNAMIC(CTreePropSheetTreeCtrl, CTreeCtrl)
98 CTreePropSheetTreeCtrl::CTreePropSheetTreeCtrl()
102 CTreePropSheetTreeCtrl::~CTreePropSheetTreeCtrl()
107 BEGIN_MESSAGE_MAP(CTreePropSheetTreeCtrl, CTreeCtrl)
108 END_MESSAGE_MAP()
110 // CTreePropSheetTreeCtrl message handlers
113 BOOL CTreePropSheetTreeCtrl::PreCreateWindow(CREATESTRUCT& cs)
115 cs.dwExStyle |= WS_EX_CLIENTEDGE;
116 // cs.style &= ~TVS_LINESATROOT;
118 return __super::PreCreateWindow(cs);