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.

54 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: PropertyCLDWnd.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of PropertyCLDWnd.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "chicago.h"
  16. #include "PropertyCLDWnd.h"
  17. #include "..\..\LgLib\Version.h"
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23. CPropertyCLDWnd::CPropertyCLDWnd()
  24. {
  25. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CPropertyCLDWnd::CPropertyCLDWnd") );
  26. }
  27. CPropertyCLDWnd::~CPropertyCLDWnd()
  28. {
  29. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CPropertyCLDWnd::~CPropertyCLDWnd") );
  30. }
  31. BEGIN_MESSAGE_MAP(CPropertyCLDWnd, CPropertySensorWnd)
  32. //{{AFX_MSG_MAP(CPropertyCLDWnd)
  33. //}}AFX_MSG_MAP
  34. END_MESSAGE_MAP()
  35. void CPropertyCLDWnd::OnDraw( CDC *pDC )
  36. {
  37. if( !m_pSensor || !IsWindowVisible() )
  38. return;
  39. CRect rect;
  40. GetClientRect( &rect );
  41. CSurfaceCLD *pSurface = ((CSensorCLD*)m_pSensor)->GetSurface();
  42. int nStretchMode = pDC->SetStretchBltMode( m_OSVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT ? HALFTONE : COLORONCOLOR );
  43. pDC->StretchBlt( rect.left, rect.top, rect.Width(), rect.Height(),
  44. pSurface, 0, 0, pSurface->GetSize().cx, pSurface->GetSize().cy, SRCCOPY );
  45. pDC->SetStretchBltMode( nStretchMode );
  46. }