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.

62 lines
1.1 KiB

  1. // VideoWindow.cpp : Implementation of CVideoWindowObj
  2. #include "Precomp.h"
  3. #include "VidView.h"
  4. #include "VideoWindow.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CVideoWindowObj
  7. CVideoWindowObj::CVideoWindowObj()
  8. : m_pVideoView( NULL ),
  9. m_hWndEdit( NULL )
  10. {
  11. DBGENTRY(CVideoWindowObj::CVideoWindowObj);
  12. m_bWindowOnly = TRUE;
  13. DBGEXIT(CVideoWindowObj::CVideoWindowObj);
  14. }
  15. CVideoWindowObj::~CVideoWindowObj()
  16. {
  17. DBGENTRY(CVideoWindowObj::~CVideoWindowObj);
  18. if( m_pVideoView )
  19. {
  20. delete m_pVideoView;
  21. }
  22. DBGEXIT(CVideoWindowObj::~CVideoWindowObj);
  23. }
  24. /*virtual*/
  25. HWND CVideoWindowObj::CreateControlWindow(HWND hWndParent, RECT& rcPos)
  26. {
  27. Create(hWndParent, rcPos);
  28. if( m_hWnd )
  29. {
  30. m_pVideoView = new CVideoView;
  31. if (NULL != m_pVideoView)
  32. {
  33. if (NULL == m_pVideoView->Create(m_hWnd))
  34. {
  35. delete m_pVideoView;
  36. m_pVideoView = NULL;
  37. }
  38. else
  39. {
  40. m_pVideoView->DeferredInit();
  41. m_pVideoView->Resize( m_rcPos.left, m_rcPos.top, RectWidth( m_rcPos ), RectHeight( m_rcPos ) );
  42. m_pVideoView->Show(TRUE);
  43. }
  44. }
  45. }
  46. else
  47. {
  48. ASSERT( 0 );
  49. }
  50. return m_hWnd;
  51. }