Old fashion design for PC-104
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.

98 lines
2.2 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: VideoListWnd.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of VideoListWnd.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "chicago.h"
  16. #include "VideoListWnd.h"
  17. #include "..\..\LgLib\Version.h"
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char THIS_FILE[]=__FILE__;
  21. #define new DEBUG_NEW
  22. #endif
  23. BEGIN_MESSAGE_MAP(CVideoListWnd, CLgListWnd)
  24. //{{AFX_MSG_MAP(CVideoListWnd)
  25. //}}AFX_MSG_MAP
  26. END_MESSAGE_MAP()
  27. CVideoListWnd::CVideoListWnd()
  28. {
  29. // log info
  30. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CVideoListWnd::CVideoListWnd" );
  31. }
  32. CVideoListWnd::~CVideoListWnd()
  33. {
  34. // log info
  35. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CVideoListWnd::~CVideoListWnd" );
  36. }
  37. BOOL CVideoListWnd::Create( CWnd *pParentWnd, int x, int y, int nWidth, int nHeight )
  38. {
  39. if( !CLgListWnd::Create( pParentWnd, x, y, nWidth, nHeight ) )
  40. {
  41. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CVideoFrameWnd::Create"), _T("CLgListWnd::Create failed") );
  42. return FALSE;
  43. }
  44. CWnd::ModifyStyle( 0, WS_DLGFRAME | WS_CLIPSIBLINGS );
  45. if( !SetItemSize( CSize(160,120) ) )
  46. {
  47. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CVideoFrameWnd::Create"), _T("SetItemSize failed") );
  48. return FALSE;
  49. }
  50. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CVideoListWnd::Create", _T("Succeeded") );
  51. return TRUE;
  52. }
  53. void CVideoListWnd::OnItemMove( void* pItem, CRect *pRect, BOOL bShow, BOOL bActive )
  54. {
  55. CWnd *pWnd = (CWnd*)pItem;
  56. if( !pWnd )
  57. return;
  58. if( bShow )
  59. {
  60. pWnd->ShowWindow( SW_SHOW );
  61. pWnd->MoveWindow( pRect );
  62. }
  63. else
  64. pWnd->ShowWindow( SW_HIDE );
  65. }
  66. void CVideoListWnd::OnItemAdd( void* pItem )
  67. {
  68. CWnd *pWnd = (CWnd*)pItem;
  69. if( !pWnd )
  70. return;
  71. pWnd->SetParent( this );
  72. pWnd->ShowWindow( SW_SHOW );
  73. }
  74. void CVideoListWnd::OnItemRemove( void *pItem )
  75. {
  76. CWnd *pWnd = (CWnd*)pItem;
  77. if( !pWnd )
  78. return;
  79. pWnd->ShowWindow( SW_HIDE );
  80. }