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.
132 lines
3.5 KiB
132 lines
3.5 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 04/11/2002
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: MapWnd.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of MapWnd.h
|
|
//----------------------------------------------------------------------------
|
|
#if !defined(AFX_MAPSITE_H__9B1BD4F4_71EC_11D4_A1EF_0010B55CB330__INCLUDED_)
|
|
#define AFX_MAPSITE_H__9B1BD4F4_71EC_11D4_A1EF_0010B55CB330__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// MapSite.h : header file
|
|
//
|
|
|
|
#include "..\DLIB\MapData.h"
|
|
#include "..\DLIB\Visual.h" // Added by ClassView
|
|
#include "..\DLIB\BackgroundDrawThread.h"
|
|
|
|
class CMapWnd : public CWnd
|
|
{
|
|
// Construction
|
|
public:
|
|
CMapWnd();
|
|
|
|
// Attributes
|
|
public:
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CMapWnd)
|
|
public:
|
|
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
public:
|
|
void SetActive( CVisual *pVisual );
|
|
|
|
SDPOINT GetMapShift() { return m_MapShift; }
|
|
// void SetMapShift( DPOINT& mapShift ) { m_MapShift = mapShift; PrepareOverlay(); }
|
|
|
|
double GetMapScale() { return m_MapScale; }
|
|
// void SetMapScale( double mapScale) { m_MapScale = mapScale; PrepareOverlay(); }
|
|
|
|
void SetMapShiftScale( SDPOINT& mapShift, double mapScale) { m_MapShift = mapShift; m_MapScale = mapScale; PrepareOverlay(); }
|
|
|
|
void SetMapData( CMapData* pMapData );
|
|
CMapData *GetMapData() { return m_pMapData; }
|
|
|
|
BOOL& BigImage(){ return m_bBigSize; }
|
|
virtual ~CMapWnd();
|
|
|
|
// Generated message map functions
|
|
private:
|
|
friend static DWORD CALLBACK ThreadProcPrepareOverlay( LPVOID lpvParam ) { return ((CMapWnd*)lpvParam)->ThreadProc(); }
|
|
DWORD ThreadProc();
|
|
|
|
struct THREAD
|
|
{
|
|
CBitmap* pOverlayBitmapOld;
|
|
CBitmap OverlayBitmap;
|
|
CDC OverlayDC;
|
|
|
|
HANDLE hEventQuit;
|
|
HANDLE hEventStart;
|
|
HANDLE hEventComplette;
|
|
|
|
CRect ViewRect;
|
|
SDPOINT MapShift;
|
|
double MapScale;
|
|
|
|
CRect RestartViewRect;
|
|
SDPOINT RestartMapShift;
|
|
double RestartMapScale;
|
|
|
|
BOOL bNeedCopy;
|
|
BOOL bNeedRestart;
|
|
BOOL bComplette;
|
|
} m_ThreadData;
|
|
HANDLE m_hThread;
|
|
|
|
private:
|
|
CVisual *m_pActive;
|
|
CMenu m_PopupMenu;
|
|
BOOL m_bFullRepaint;
|
|
LRESULT OnWMSensorUpdate( WPARAM wParam, LPARAM lParam );
|
|
|
|
void PrepareOverlay();
|
|
|
|
CBitmap* m_pOverlayBitmapOld;
|
|
CFont* m_pOverlayFontOld;
|
|
CBitmap m_OverlayBitmap;
|
|
CDC m_OverlayDC;
|
|
|
|
BOOL m_bBigSize;
|
|
BOOL m_bInverse;
|
|
SDPOINT m_MapShift;
|
|
double m_MapScale;
|
|
CMapData* m_pMapData;
|
|
CRect m_ClientRect;
|
|
CSensor *m_pSensor;
|
|
|
|
CBackgroundDrawThread m_MapDrawThread;
|
|
protected:
|
|
//{{AFX_MSG(CMapWnd)
|
|
afx_msg void OnPaint();
|
|
afx_msg void OnTimer(UINT nIDEvent);
|
|
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
|
|
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_MAPSITE_H__9B1BD4F4_71EC_11D4_A1EF_0010B55CB330__INCLUDED_)
|