PPageFileInfoSheet.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 // PPageFileInfoSheet.cpp : implementation file
00023 //
00024 
00025 #include "stdafx.h"
00026 #include "mplayerc.h"
00027 #include "MainFrm.h"
00028 #include "PPageFileInfoSheet.h"
00029 
00030 // CPPageFileInfoSheet
00031 
00032 IMPLEMENT_DYNAMIC(CPPageFileInfoSheet, CPropertySheet)
00033 CPPageFileInfoSheet::CPPageFileInfoSheet(CString fn, CMainFrame* pParentWnd)
00034         : CPropertySheet(_T("Properties"), pParentWnd, 0)
00035         , m_clip(fn, pParentWnd->pGB)
00036         , m_details(fn, pParentWnd->pGB, pParentWnd->m_pCAP)
00037         , m_res(fn, pParentWnd->pGB)
00038 {
00039         AddPage(&m_clip);
00040         AddPage(&m_details);
00041 
00042         BeginEnumFilters(pParentWnd->pGB, pEF, pBF)
00043         {
00044                 if(CComQIPtr<IDSMResourceBag> pRB = pBF)
00045                 if(pRB && pRB->ResGetCount() > 0)
00046                 {
00047                         AddPage(&m_res);
00048                         break;
00049                 }
00050         }
00051         EndEnumFilters
00052 }
00053 
00054 CPPageFileInfoSheet::~CPPageFileInfoSheet()
00055 {
00056 }
00057 
00058 
00059 BEGIN_MESSAGE_MAP(CPPageFileInfoSheet, CPropertySheet)
00060 END_MESSAGE_MAP()
00061 
00062 // CPPageFileInfoSheet message handlers
00063 
00064 BOOL CPPageFileInfoSheet::OnInitDialog()
00065 {
00066         BOOL fRet = __super::OnInitDialog();
00067         
00068         GetDlgItem(IDCANCEL)->ShowWindow(SW_HIDE);
00069         GetDlgItem(ID_APPLY_NOW)->ShowWindow(SW_HIDE);
00070         GetDlgItem(IDOK)->SetWindowText(_T("Close"));
00071 
00072         CRect r;
00073         GetDlgItem(ID_APPLY_NOW)->GetWindowRect(&r);
00074         ScreenToClient(r);
00075         GetDlgItem(IDOK)->MoveWindow(r);
00076 
00077         return fRet;
00078 }
00079 

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