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.
75 lines
1.7 KiB
75 lines
1.7 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: VideoWnd.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of VideoWnd.cpp
|
|
//----------------------------------------------------------------------------
|
|
// VideoWnd.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "VideoWnd.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CVideoWnd
|
|
|
|
CVideoWnd::CVideoWnd()
|
|
{
|
|
}
|
|
|
|
CVideoWnd::~CVideoWnd()
|
|
{
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CVideoWnd, CWnd)
|
|
//{{AFX_MSG_MAP(CVideoWnd)
|
|
ON_WM_PAINT()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CVideoWnd message handlers
|
|
|
|
BOOL CVideoWnd::Create(CWnd *pParentWnd, CRect &rect)
|
|
{
|
|
CString strClassName = ::AfxRegisterWndClass( CS_HREDRAW | CS_VREDRAW, LoadCursor( NULL, IDC_ARROW ), NULL, NULL );
|
|
|
|
if( !CWnd::Create( strClassName, NULL, WS_CHILD | WS_VISIBLE, rect, pParentWnd, 0 ) )
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CVideoWnd::OnPaint()
|
|
{
|
|
CPaintDC dc(this);
|
|
|
|
CRect rect;
|
|
GetClientRect( &rect );
|
|
|
|
m_VideoDIB.Draw( dc.GetSafeHdc(), &rect );
|
|
|
|
GetParent()->SendMessage( WM_VIDEO_READY, m_nSequence, m_nSequence );
|
|
}
|
|
|
|
void CVideoWnd::UpdateVideoDIB( CLgImageDIB *pDIB, INT nSequence )
|
|
{
|
|
m_nSequence = nSequence;
|
|
m_VideoDIB.Create( (LPBITMAPINFO)*pDIB, *pDIB );
|
|
InvalidateRect( NULL );
|
|
}
|