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.
61 lines
1.5 KiB
61 lines
1.5 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: ImageWnd.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of ImageWnd.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "ImageWnd.h"
|
|
#include "..\LgLib\Version.h"
|
|
|
|
CImageWnd::CImageWnd()
|
|
{
|
|
|
|
}
|
|
|
|
CImageWnd::~CImageWnd()
|
|
{
|
|
|
|
}
|
|
|
|
BOOL CImageWnd::Create( HWND hParent, RECT *pRect )
|
|
{
|
|
LPCTSTR pClassName = _T("LgImageWnd");
|
|
|
|
HINSTANCE hInstance = (HINSTANCE)::GetWindowLong( hParent, GWL_HINSTANCE );
|
|
|
|
RegisterClass( pClassName, hInstance );
|
|
|
|
if( !CGenericWnd::Create( pClassName, NULL, WS_CHILD | WS_VISIBLE, pRect->left, pRect->top, pRect->right - pRect->left, pRect->bottom - pRect->top, hParent, NULL, hInstance ) )
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
LRESULT CImageWnd::OnPaint( WPARAM wParam, LPARAM lParam )
|
|
{
|
|
PAINTSTRUCT ps;
|
|
HDC hDC = BeginPaint( &ps );
|
|
|
|
RECT rect;
|
|
GetClientRect( &rect );
|
|
::BitBlt( hDC, rect.left, rect.top, rect.right, rect.bottom, m_MemoryDC.GetSafeHdc(), 0, 0, SRCCOPY );
|
|
|
|
EndPaint( &ps );
|
|
return TRUE;
|
|
}
|
|
|
|
LRESULT CImageWnd::OnSize( WPARAM wParam, LPARAM lParam )
|
|
{
|
|
m_MemoryDC.Create( LOWORD(lParam), HIWORD(lParam) );
|
|
return TRUE;
|
|
}
|