Leaked source code of windows server 2003
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.

94 lines
2.7 KiB

  1. // VideoWindow.h : Declaration of the CVideoWindowObj
  2. #ifndef __VIDEOWINDOW_H_
  3. #define __VIDEOWINDOW_H_
  4. #include "resource.h" // main symbols
  5. #include "NetMeeting.h"
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CVideoWindowObj
  8. class ATL_NO_VTABLE CVideoWindowObj :
  9. public CComObjectRootEx<CComSingleThreadModel>,
  10. public IDispatchImpl<IVideoWindow, &IID_IVideoWindow, &LIBID_NetMeetingLib>,
  11. public CComControl<CVideoWindowObj>,
  12. public IPersistStreamInitImpl<CVideoWindowObj>,
  13. public IOleControlImpl<CVideoWindowObj>,
  14. public IOleObjectImpl<CVideoWindowObj>,
  15. public IOleInPlaceActiveObjectImpl<CVideoWindowObj>,
  16. public IViewObjectExImpl<CVideoWindowObj>,
  17. public IOleInPlaceObjectWindowlessImpl<CVideoWindowObj>,
  18. public CComCoClass<CVideoWindowObj, &CLSID_VideoWindow>,
  19. public ISupportErrorInfoImpl<&IID_IVideoWindow>,
  20. public IObjectSafetyImpl<CVideoWindowObj, INTERFACESAFE_FOR_UNTRUSTED_CALLER>
  21. {
  22. private:
  23. CVideoView* m_pVideoView;
  24. HWND m_hWndEdit;
  25. public:
  26. CVideoWindowObj();
  27. ~CVideoWindowObj();
  28. DECLARE_REGISTRY_RESOURCEID(IDR_VIDEOWINDOW)
  29. DECLARE_PROTECT_FINAL_CONSTRUCT()
  30. BEGIN_COM_MAP(CVideoWindowObj)
  31. COM_INTERFACE_ENTRY(IVideoWindow)
  32. COM_INTERFACE_ENTRY(IDispatch)
  33. COM_INTERFACE_ENTRY(IObjectSafety)
  34. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  35. COM_INTERFACE_ENTRY(IViewObjectEx)
  36. COM_INTERFACE_ENTRY(IViewObject2)
  37. COM_INTERFACE_ENTRY(IViewObject)
  38. COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
  39. COM_INTERFACE_ENTRY(IOleInPlaceObject)
  40. COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
  41. COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
  42. COM_INTERFACE_ENTRY(IOleControl)
  43. COM_INTERFACE_ENTRY(IOleObject)
  44. COM_INTERFACE_ENTRY(IPersistStreamInit)
  45. COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
  46. END_COM_MAP()
  47. BEGIN_PROP_MAP(CVideoWindowObj)
  48. PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
  49. PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
  50. // Example entries
  51. // PROP_ENTRY("Property Description", dispid, clsid)
  52. // PROP_PAGE(CLSID_StockColorPage)
  53. END_PROP_MAP()
  54. BEGIN_MSG_MAP(CVideoWindowObj)
  55. // CHAIN_MSG_MAP(CComControl<CVideoWindowObj>)
  56. MESSAGE_HANDLER(WM_PAINT, MyOnPaint)
  57. DEFAULT_REFLECTION_HANDLER()
  58. END_MSG_MAP()
  59. virtual HWND CreateControlWindow(HWND hWndParent, RECT& rcPos);
  60. LRESULT MyOnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  61. {
  62. PAINTSTRUCT ps;
  63. ::BeginPaint(m_hWnd, &ps );
  64. if( ::IsWindow( m_hWndEdit ) )
  65. {
  66. ::InvalidateRect(m_hWndEdit, NULL, TRUE);
  67. ::UpdateWindow( m_hWndEdit );
  68. TRACE_OUT(("MyOnPaint"));
  69. }
  70. ::EndPaint( m_hWnd, &ps );
  71. return 1;
  72. }
  73. // IViewObjectEx
  74. DECLARE_VIEW_STATUS(0)
  75. public:
  76. };
  77. #endif //__VIDEOWINDOW_H_