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.
 
 
 
 
 

77 lines
1.9 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: AreaWnd.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of AreaWnd.h
//----------------------------------------------------------------------------
#ifndef __AREA__WND__H__INCLUDED__
#define __AREA__WND__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "..\DLIB\BackgroundDrawThread.h"
#include "..\..\LgLib\LgAux.h"
class CAreaWnd : public CWnd
{
public:
CAreaWnd();
public:
const double GetScale() const { return m_dScale; }
const CLgDPoint& GetShift() const { return m_dpShift; }
public:
void SetScale( double dScale, CLgDPoint *pPoint = NULL );
void SetShift( CLgDPoint dpShift ) { m_dpShift = dpShift; OnChangeViewParams(); }
void SetCenter( CLgDPoint *pDPoint );
public:
//{{AFX_VIRTUAL(CAreaWnd)
//}}AFX_VIRTUAL
public:
void FitAreaToWindow();
BOOL Create( CWnd *pParentWnd, CBackground *pBackground, int x, int y, int nWidth, int nHeight );
virtual ~CAreaWnd();
protected:
//{{AFX_MSG(CAreaWnd)
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
virtual void OnDraw( CDC *pDC );
virtual LRESULT OnBackgroundDraw( WPARAM, LPARAM );
virtual void OnChangeViewParams();
protected:
CRect GetFitFrame();
CLgDPoint WindowToArea( CPoint* pPoint );
CLgDRect WindowToArea( CRect* pRect );
CPoint AreaToWindow( CLgDPoint* pDPoint );
CRect AreaToWindow( CLgDRect* pRect );
protected:
CBackground *m_pBackground;
CBackgroundDrawThread m_BackgroundDrawThread;
CLgMemoryDC m_BackgroundDC;
double m_dScale;
CLgDPoint m_dpShift;
};
//{{AFX_INSERT_LOCATION}}
#endif