asf2mkvDlg.h

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 // asf2mkvDlg.h : header file
00023 //
00024 
00025 #pragma once
00026 
00027 #include <afxole.h>
00028 
00029 #define WM_OPENURL WM_APP
00030 
00031 class CUrlDropTarget : public COleDropTarget
00032 {
00033 public:
00034         CUrlDropTarget() {}
00035 
00036         DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
00037         DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
00038         BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
00039         DROPEFFECT OnDropEx(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropDefault, DROPEFFECT dropList, CPoint point);
00040         void OnDragLeave(CWnd* pWnd);
00041         DROPEFFECT OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point);
00042 
00043         DECLARE_MESSAGE_MAP()
00044 };
00045 
00046 // Casf2mkvDlg dialog
00047 class Casf2mkvDlg : public CResizableDialog
00048 {
00049         CComPtr<IGraphBuilder> pGB;
00050         CComQIPtr<IMediaControl> pMC;
00051         CComQIPtr<IMediaEventEx> pME;
00052         CComQIPtr<IMediaSeeking> pMS;
00053         CComQIPtr<IVideoWindow> pVW;
00054         CComQIPtr<IBasicVideo> pBV;
00055 
00056         bool m_fRecording;
00057         CString m_dst;
00058 
00059         class CRecentFileAndURLList : public CRecentFileList
00060         {
00061         public:
00062                 CRecentFileAndURLList(UINT nStart, LPCTSTR lpszSection,
00063                         LPCTSTR lpszEntryFormat, int nSize,
00064                         int nMaxDispLen = AFX_ABBREV_FILENAME_LEN);
00065 
00066                 virtual void Add(LPCTSTR lpszPathName); // we have to override CRecentFileList::Add because the original version can't handle URLs
00067         };
00068 
00069         CRecentFileAndURLList m_mru;
00070         void SetupCombo();
00071 
00072         void SetVideoRect();
00073 
00074         CUrlDropTarget m_urlDropTarget;
00075 
00076 // Construction
00077 public:
00078         Casf2mkvDlg(CWnd* pParent = NULL);      // standard constructor
00079 
00080 // Dialog Data
00081         enum { IDD = IDD_ASF2MKV_DIALOG };
00082 
00083         protected:
00084         virtual void DoDataExchange(CDataExchange* pDX);        // DDX/DDV support
00085 
00086 // Implementation
00087 protected:
00088         HICON m_hIcon;
00089 
00090         CComboBox m_combo;
00091         CStatic m_video;
00092 
00093         // Generated message map functions
00094         virtual BOOL OnInitDialog();
00095         virtual BOOL DestroyWindow();
00096         DECLARE_MESSAGE_MAP()
00097 
00098 public:
00099         afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00100         afx_msg void OnPaint();
00101         afx_msg HCURSOR OnQueryDragIcon();
00102         afx_msg LRESULT OnGraphNotify(WPARAM wParam, LPARAM lParam);
00103         afx_msg void OnRecord();
00104         afx_msg void OnUpdateRecord(CCmdUI* pCmdUI);
00105         afx_msg void OnUpdateFileName(CCmdUI* pCmdUI);
00106         afx_msg void OnUpdateSettings(CCmdUI* pCmdUI);
00107         afx_msg void OnSize(UINT nType, int cx, int cy);
00108         afx_msg void OnTimer(UINT nIDEvent);
00109         afx_msg void OnBnClickedButton2();
00110         afx_msg LRESULT OnUrlOpen(WPARAM wParam, LPARAM lParam);
00111 };

Generated on Tue Dec 13 14:46:41 2005 for guliverkli by  doxygen 1.4.5