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.

73 lines
1.6 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: LgUISiteClock.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgUISiteClock.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "LgUISiteClock.h"
  16. #include "..\UICamera\LgUICameraVideoWnd.h"
  17. CLgUISiteClock::CLgUISiteClock()
  18. {
  19. }
  20. CLgUISiteClock::~CLgUISiteClock()
  21. {
  22. Destroy();
  23. }
  24. BEGIN_MESSAGE_MAP(CLgUISiteClock, CWnd )
  25. //{{AFX_MSG_MAP(CLgUISiteClock)
  26. ON_WM_TIMER()
  27. //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29. BOOL CLgUISiteClock::Create()
  30. {
  31. CString strClassName = ::AfxRegisterWndClass( CS_HREDRAW | CS_VREDRAW, NULL, NULL, NULL );
  32. CRect rect( 0, 0, 1, 1 );
  33. if( !CWnd::CreateEx( 0, strClassName, NULL, WS_OVERLAPPED, rect, NULL, 0 ) )
  34. return FALSE;
  35. // set timer
  36. CWnd::SetTimer( 0, 100, NULL );
  37. return TRUE;
  38. }
  39. BOOL CLgUISiteClock::Destroy()
  40. {
  41. return DestroyWindow();
  42. }
  43. BOOL CLgUISiteClock::DestroyWindow()
  44. {
  45. CWnd::KillTimer( 0 );
  46. return CWnd::DestroyWindow();
  47. }
  48. void CLgUISiteClock::OnTimer( UINT nIDEvent )
  49. {
  50. CLgArray< CLgLink<CLgUISiteCamera,CLgUISiteClock>* >& arrCamera = *this;
  51. for( INT i = 0; i < arrCamera.GetCount(); i++ )
  52. {
  53. CLgUISiteCamera *pCamera = *arrCamera[i];
  54. ASSERT( pCamera );
  55. pCamera->OnUISiteClock();
  56. }
  57. CWnd::OnTimer( nIDEvent );
  58. }