home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Misc / DMOEnum / dmoenumdlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  3.7 KB  |  122 lines

  1. //------------------------------------------------------------------------------
  2. // File: DMOEnumDlg.h
  3. //
  4. // Desc: DirectShow sample code - header file for device enumeration dialog.
  5. //
  6. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8.  
  9.  
  10. #include <dshow.h>
  11. #include <dmo.h>
  12.  
  13. #if !defined(AFX_DMOENUMDLG_H__A96832BF_0309_4844_9B33_5E72285C3F3E__INCLUDED_)
  14. #define AFX_DMOENUMDLG_H__A96832BF_0309_4844_9B33_5E72285C3F3E__INCLUDED_
  15.  
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19.  
  20. //
  21. // Macros
  22. //
  23. #define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }
  24.  
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CDMOEnumDlg dialog
  28.  
  29. class CDMOEnumDlg : public CDialog
  30. {
  31. // Construction
  32. public:
  33.     CDMOEnumDlg(CWnd* pParent = NULL);    // standard constructor
  34.     HRESULT EnumDMOs(IEnumDMO *pEnumDMO);
  35.     void FillCategoryList(void);
  36.     void DisplayFullCategorySet(void);
  37.     void AddFilterCategory(const TCHAR *szCatDesc, const GUID *pCatGuid);
  38.     void AddFilter(const TCHAR *szFilterName, const GUID *pCatGuid);
  39.     void AddTypeInfo(const GUID *pCLSID);
  40.     void ShowSelectedDMOInfo(const GUID *pCLSID);
  41.     void ClearDMOInfo(void);
  42.     void ClearDeviceList(void);
  43.     void ClearFilterList(void);
  44.     void ClearTypeLists(void);
  45.     void SetNumClasses(int nClasses);
  46.     void SetNumFilters(int nFilters);
  47.     void ShowFilenameByCLSID(REFCLSID clsid);
  48.     void ReleaseDMO(void);
  49.     void GetFormatString(TCHAR *szFormat, DMO_MEDIA_TYPE *pType);
  50.     void GetGUIDString(TCHAR *szString, GUID *pGUID);
  51.     void GetTypeSubtypeString(TCHAR *szCLSID, DMO_PARTIAL_MEDIATYPE& aList);
  52.  
  53. // Dialog Data
  54.     //{{AFX_DATA(CDMOEnumDlg)
  55.     enum { IDD = IDD_DMOENUM_DIALOG };
  56.     CStatic    m_StrOutType;
  57.     CStatic    m_StrOutSubtype;
  58.     CStatic    m_StrInType;
  59.     CStatic    m_StrInSubtype;
  60.     CButton    m_CheckOutQC;
  61.     CButton    m_CheckInQC;
  62.     CStatic    m_StrInFormat;
  63.     CStatic    m_StrOutFormat;
  64.     CButton    m_CheckOutFixedSize;
  65.     CButton    m_CheckOutWholeSamples;
  66.     CButton    m_CheckOutOptional;
  67.     CButton    m_CheckOutOneSample;
  68.     CButton    m_CheckOutDiscardable;
  69.     CButton    m_CheckInWholeSamples;
  70.     CButton    m_CheckInOneSample;
  71.     CButton    m_CheckInHoldsBuffers;
  72.     CButton    m_CheckInFixedSize;
  73.     CStatic    m_nOutputStreams;
  74.     CStatic    m_nInputStreams;
  75.     CListBox    m_ListOutputStreams;
  76.     CListBox    m_ListInputStreams;
  77.     CStatic    m_nOutputTypes;
  78.     CStatic    m_nInputTypes;
  79.     CListBox    m_ListOutputTypes;
  80.     CListBox    m_ListInputTypes;
  81.     CButton    m_bCheckKeyed;
  82.     CStatic    m_StrFilename;
  83.     CStatic    m_StrFilters;
  84.     CStatic    m_StrClasses;
  85.     CListBox    m_FilterList;
  86.     CListBox    m_DeviceList;
  87.     //}}AFX_DATA
  88.  
  89.     // ClassWizard generated virtual function overrides
  90.     //{{AFX_VIRTUAL(CDMOEnumDlg)
  91.     protected:
  92.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  93.     //}}AFX_VIRTUAL
  94.  
  95. // Implementation
  96. protected:
  97.     HICON m_hIcon;
  98.     IMediaObject  *m_pDMO;
  99.     IGraphBuilder *m_pGB;
  100.  
  101.     // Generated message map functions
  102.     //{{AFX_MSG(CDMOEnumDlg)
  103.     virtual BOOL OnInitDialog();
  104.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  105.     afx_msg void OnPaint();
  106.     afx_msg HCURSOR OnQueryDragIcon();
  107.     afx_msg void OnSelchangeListDevices();
  108.     afx_msg void OnClose();
  109.     afx_msg void OnCheckShowall();
  110.     afx_msg void OnSelchangeListFilters();
  111.     afx_msg void OnCheckKeyed();
  112.     afx_msg void OnSelchangeListInputStreams();
  113.     afx_msg void OnSelchangeListOutputStreams();
  114.     //}}AFX_MSG
  115.     DECLARE_MESSAGE_MAP()
  116. };
  117.  
  118. //{{AFX_INSERT_LOCATION}}
  119. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  120.  
  121. #endif // !defined(AFX_DMOENUMDLG_H__A96832BF_0309_4844_9B33_5E72285C3F3E__INCLUDED_)
  122.