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.
 
 
 
 
 

110 lines
2.6 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: TroubleListWnd.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of TroubleListWnd.h
//----------------------------------------------------------------------------
#ifndef __TROUBLE__LIST__WND__H__INCLUDED__
#define __TROUBLE__LIST__WND__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "..\..\LgLib\MFC\ListWnd.h"
#include "..\DLIB\SensorArray.h" // Added by ClassView
#include "..\..\LgLib\MFC\MemoryDC.h" // Added by ClassView
#include "..\DLIB\Background.h" // Added by ClassView
#include "..\..\LgLib\UIMap\LgUIMapBackground.h"
class CTroubleListWnd : public CLgListWnd
{
public:
CTroubleListWnd();
virtual ~CTroubleListWnd();
public:
virtual BOOL Create( CWnd *pParentWnd, int x, int y, int nWidth, int nHeight, CLgUIMapBackground* pBackground );
public:
void SetItemImage( CSensor*, HBITMAP );
void SetSensorArray( CSensorArray *pSensorArray ) { m_pSensorArray = pSensorArray; }
void UpdateInfo( BOOL bOdd );
//{{AFX_VIRTUAL(CTroubleListWnd)
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CTroubleListWnd)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
enum{ TROUBLE_IMAGE_SKIP = 5, TROUBLE_IMAGE_TIMEOUT = 1000UL };
protected:
enum{ TT_SENSOR, TT_WARNING };
typedef struct TROUBLE
{
TROUBLE()
{
bImage = FALSE;
// reset images
memset( pBitmap, 0, sizeof(pBitmap) );
nBitmapCount = 0;
nBitmapIndexAdd = 0;
nBitmapIndexView = 0;
dwImageTime = 0;
nImageSkip = 0;
}
int nType;
// union
// {
struct
{
CSensor *pSensor;
CLgMemoryDC dcDraw;
HBITMAP pBitmap[ 10 ];
INT nBitmapCount;
INT nBitmapIndexAdd;
INT nBitmapIndexView;
DWORD dwImageTime;
INT nImageSkip;
};
struct
{
CString strLabel;
CString strText;
};
// };
BOOL bImage;
}TROUBLE, *PTROUBLE;
protected:
virtual void OnItemMove( void* pItem, CRect *pRect, BOOL bShow, BOOL bActive );
virtual void OnItemRemove( void *pItem );
virtual void OnItemDraw( CDC *pDC, CRect *pRect, void *pItem, BOOL bActive );
protected:
CLgMemoryDC m_MemoryDC;
CSensorArray *m_pSensorArray;
BOOL m_bOddUpdate;
CRect m_MinimapRect;
private:
HICON m_hIconPower;
};
//{{AFX_INSERT_LOCATION}}
#endif