//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: PropertyCLDWnd.cpp // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Source file of PropertyCLDWnd.cpp //---------------------------------------------------------------------------- #include "stdafx.h" #include "chicago.h" #include "PropertyCLDWnd.h" #include "..\..\LgLib\Version.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif CPropertyCLDWnd::CPropertyCLDWnd() { LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CPropertyCLDWnd::CPropertyCLDWnd") ); } CPropertyCLDWnd::~CPropertyCLDWnd() { LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CPropertyCLDWnd::~CPropertyCLDWnd") ); } BEGIN_MESSAGE_MAP(CPropertyCLDWnd, CPropertySensorWnd) //{{AFX_MSG_MAP(CPropertyCLDWnd) //}}AFX_MSG_MAP END_MESSAGE_MAP() void CPropertyCLDWnd::OnDraw( CDC *pDC ) { if( !m_pSensor || !IsWindowVisible() ) return; CRect rect; GetClientRect( &rect ); CSurfaceCLD *pSurface = ((CSensorCLD*)m_pSensor)->GetSurface(); int nStretchMode = pDC->SetStretchBltMode( m_OSVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT ? HALFTONE : COLORONCOLOR ); pDC->StretchBlt( rect.left, rect.top, rect.Width(), rect.Height(), pSurface, 0, 0, pSurface->GetSize().cx, pSurface->GetSize().cy, SRCCOPY ); pDC->SetStretchBltMode( nStretchMode ); }