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)
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
27 #include "PPageSheet.h"
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
)
44 AddPage(&m_webserver
);
45 AddPage(&m_internalfilters
);
46 AddPage(&m_audioswitcher
);
47 AddPage(&m_externalfilters
);
48 AddPage(&m_subtitles
);
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
))
70 CPPageSheet::~CPPageSheet()
74 CTreeCtrl
* CPPageSheet::CreatePageTreeObject()
76 return new CTreePropSheetTreeCtrl();
79 BEGIN_MESSAGE_MAP(CPPageSheet
, CTreePropSheet
)
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
);
95 // CTreePropSheetTreeCtrl
97 IMPLEMENT_DYNAMIC(CTreePropSheetTreeCtrl
, CTreeCtrl
)
98 CTreePropSheetTreeCtrl::CTreePropSheetTreeCtrl()
102 CTreePropSheetTreeCtrl::~CTreePropSheetTreeCtrl()
107 BEGIN_MESSAGE_MAP(CTreePropSheetTreeCtrl
, CTreeCtrl
)
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
);