Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
4.0 KiB

  1. // Copyright (c) 1999 Microsoft Corporation. All Rights Reserved.
  2. // dvdopt.h : Declaration of the Cdvdopt
  3. #ifndef __DVDOPT_H_
  4. #define __DVDOPT_H_
  5. #include "dvdoptCP.h"
  6. #include "resource.h" // main symbols
  7. #include <atlctl.h>
  8. #define MAX_PASSWD 20
  9. #define PRE_PASSWD 20
  10. #define MAX_RATE 10
  11. class COptionsDlg;
  12. /////////////////////////////////////////////////////////////////////////////
  13. // Cdvdopt
  14. class ATL_NO_VTABLE Cdvdopt :
  15. public CComObjectRootEx<CComSingleThreadModel>,
  16. public IDispatchImpl<Idvdopt, &IID_Idvdopt, &LIBID_MSDVDOPTLib>,
  17. public CComControl<Cdvdopt>,
  18. public IPersistStreamInitImpl<Cdvdopt>,
  19. public IOleControlImpl<Cdvdopt>,
  20. public IOleObjectImpl<Cdvdopt>,
  21. public IOleInPlaceActiveObjectImpl<Cdvdopt>,
  22. public IViewObjectExImpl<Cdvdopt>,
  23. public IOleInPlaceObjectWindowlessImpl<Cdvdopt>,
  24. public IPersistStorageImpl<Cdvdopt>,
  25. public ISpecifyPropertyPagesImpl<Cdvdopt>,
  26. public IQuickActivateImpl<Cdvdopt>,
  27. public IDataObjectImpl<Cdvdopt>,
  28. public IProvideClassInfo2Impl<&CLSID_dvdopt, &DIID__IDVDOpt, &LIBID_MSDVDOPTLib>,
  29. public CComCoClass<Cdvdopt, &CLSID_dvdopt>,
  30. public CProxy_IDVDOpt< Cdvdopt >,
  31. public IConnectionPointContainerImpl<Cdvdopt>
  32. {
  33. public:
  34. DECLARE_REGISTRY_RESOURCEID(IDR_DVDOPT)
  35. DECLARE_PROTECT_FINAL_CONSTRUCT()
  36. BEGIN_COM_MAP(Cdvdopt)
  37. COM_INTERFACE_ENTRY(Idvdopt)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. COM_INTERFACE_ENTRY(IViewObjectEx)
  40. COM_INTERFACE_ENTRY(IViewObject2)
  41. COM_INTERFACE_ENTRY(IViewObject)
  42. COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
  43. COM_INTERFACE_ENTRY(IOleInPlaceObject)
  44. COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
  45. COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
  46. COM_INTERFACE_ENTRY(IOleControl)
  47. COM_INTERFACE_ENTRY(IOleObject)
  48. COM_INTERFACE_ENTRY(IPersistStreamInit)
  49. COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
  50. COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
  51. COM_INTERFACE_ENTRY(IQuickActivate)
  52. COM_INTERFACE_ENTRY(IPersistStorage)
  53. COM_INTERFACE_ENTRY(IDataObject)
  54. COM_INTERFACE_ENTRY(IProvideClassInfo)
  55. COM_INTERFACE_ENTRY(IProvideClassInfo2)
  56. COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
  57. END_COM_MAP()
  58. BEGIN_PROP_MAP(Cdvdopt)
  59. PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
  60. PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
  61. // Example entries
  62. // PROP_ENTRY("Property Description", dispid, clsid)
  63. // PROP_PAGE(CLSID_StockColorPage)
  64. END_PROP_MAP()
  65. BEGIN_CONNECTION_POINT_MAP(Cdvdopt)
  66. CONNECTION_POINT_ENTRY(DIID__IDVDOpt)
  67. END_CONNECTION_POINT_MAP()
  68. BEGIN_MSG_MAP(Cdvdopt)
  69. CHAIN_MSG_MAP(CComControl<Cdvdopt>)
  70. DEFAULT_REFLECTION_HANDLER()
  71. END_MSG_MAP()
  72. // Handler prototypes:
  73. // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  74. // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  75. // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  76. // IViewObjectEx
  77. DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE)
  78. COptionsDlg *m_pDlgOpt;
  79. CComPtr<IMSWebDVD> m_pDvd;
  80. HWND m_hParentWnd;
  81. // Idvdopt
  82. public:
  83. STDMETHOD(ParentalLevelOverride)(/*[in]*/ PG_OVERRIDE_REASON reason);
  84. STDMETHOD(get_PlaySpeed)(/*[out, retval]*/ double *pVal);
  85. STDMETHOD(put_PlaySpeed)(/*[in]*/ double newVal);
  86. STDMETHOD(get_BackwardScanSpeed)(/*[out, retval]*/ double *pVal);
  87. STDMETHOD(put_BackwardScanSpeed)(/*[in]*/ double newVal);
  88. STDMETHOD(get_ForwardScanSpeed)(/*[out, retval]*/ double *pVal);
  89. STDMETHOD(put_ForwardScanSpeed)(/*[in]*/ double newVal);
  90. Cdvdopt();
  91. virtual ~Cdvdopt();
  92. STDMETHOD(Close)();
  93. STDMETHOD(Show)();
  94. STDMETHOD(get_ParentWindow)(/*[out, retval]*/ VARIANT *pVal);
  95. STDMETHOD(put_ParentWindow)(/*[in]*/ VARIANT newVal);
  96. STDMETHOD(get_WebDVD)(/*[out, retval]*/ IDispatch* *pVal);
  97. STDMETHOD(put_WebDVD)(/*[in]*/ IDispatch* newVal);
  98. HRESULT OnDraw(ATL_DRAWINFO& di) { return S_OK; }
  99. private:
  100. void CleanUp();
  101. };
  102. int DVDMessageBox(HWND hWnd, LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK | MB_ICONEXCLAMATION);
  103. int DVDMessageBox(HWND hWnd, UINT nID, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK | MB_ICONEXCLAMATION);
  104. #endif //__DVDOPT_H_