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.
|
|
//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright � 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: VideoFrameGrabberWnd.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of VideoFrameGrabberWnd.h
//----------------------------------------------------------------------------
#ifndef __VIDEO__FRAME__GRABBER__WND__H__INCLUDED__
#define __VIDEO__FRAME__GRABBER__WND__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "VideoWnd.h"
class CVideoFrameGrabberWnd : public CVideoWnd {public: CVideoFrameGrabberWnd(); virtual ~CVideoFrameGrabberWnd();
public: virtual BOOL Create( HWND, LPPOINT pPoint = NULL, LPSIZE pSize = NULL ); virtual void UpdatePositions(); virtual HWND GetSafeHwnd(); virtual BOOL ShowWindow( int nShow ); virtual bool IsNeedUpdateFrame() { return ::IsWindowVisible( m_hFrameGrabberWnd ) == TRUE; } virtual void UpdateFrame();
public: virtual HBITMAP StoreImage( HANDLE, LPCTSTR, INT nBitCount ); virtual HBITMAP GetSnapshot();
protected: static LRESULT CALLBACK WindowProc_( HWND, UINT, WPARAM, LPARAM );
protected: enum{ IMAGE_WIDTH = 320, IMAGE_HEIGHT = 240 };// enum{ IMAGE_WIDTH = 384, IMAGE_HEIGHT = 288 };
// enum{ IMAGE_WIDTH = 192, IMAGE_HEIGHT = 144 };
void Snapshot(); void Draw( HDC );
protected: LRESULT OnTimer( HWND, WPARAM, LPARAM ); LRESULT OnPaint( HWND, WPARAM, LPARAM ); LRESULT WindowProc( HWND, UINT, WPARAM, LPARAM );protected: void InitSnapshot(); HWND m_hFrameGrabberWnd; HDC m_hFrameGrabberMemDC; HBITMAP m_hFrameGrabberMemBitmap; LPBYTE m_pFrameGrabberBuffer; LPBITMAPINFO m_pFrameGrabberBmi; CRITICAL_SECTION m_CriticalSection;};
#endif
|