
/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/MYLIST.H__   1.2.1.4   17 Apr 1997 15:57:20   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/MYLIST.H__  $
** 
**    Rev 1.2.1.4   17 Apr 1997 15:57:20   ZJRD
** No change.
** 
**    Rev 1.2.1.3   16 Apr 1997 10:28:46   ZJRD
** No change.
** 
**    Rev 1.2.1.2   10 Apr 1997 15:39:08   ZJRD
** No change.
** 
**    Rev 1.2.1.1   03 Apr 1997 15:18:14   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:23:12   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:33:14   ZJRD
** Easy Pack SLD 2.09c
** 
**    Rev 1.0   12 Mar 1997 14:48:34   ZJRD
** Initial revision.
** 
**    Rev 1.7.1.0.1.2   09 Dec 1996 10:14:58   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.7.1.0.1.0   11 Nov 1996 12:58:16   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.7.1.4   09 Sep 1996 13:15:28   ZJRD
** No change.
** 
**    Rev 1.7.1.3   05 Sep 1996 11:27:00   ZJRD
** No change.
** 
**    Rev 1.7.1.2   02 Sep 1996 09:54:08   ZJRD
** No change.
** 
**    Rev 1.7.1.1   28 Aug 1996 15:47:42   ZJRD
** No change.
** 
**    Rev 1.7.1.0   12 Aug 1996 10:52:22   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.5   05 Jun 1996 14:55:42   ZJRD
** EasyPack/SLD Version 1.96
** 
**    Rev 1.3   16 May 1996 09:00:46   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:15:10   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:23:02   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.29   18 Apr 1996 13:02:52   Shirley
** No change.
** 
**    Rev 1.28   12 Apr 1996 10:36:56   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.26   15 Feb 1996 08:49:54   Shirley
** No change.
** 
**    Rev 1.25   12 Feb 1996 14:02:22   Shirley
** No change.
** 
**    Rev 1.24   06 Feb 1996 15:27:38   Shirley
** No change.
** 
**    Rev 1.23   06 Feb 1996 13:43:14   Shirley
** No change.
** 
**    Rev 1.22   01 Feb 1996 10:16:08   Shirley
** No change.
** 
**    Rev 1.21   26 Jan 1996 09:12:58   Shirley
** No change.
** 
**    Rev 1.20   25 Jan 1996 13:13:38   Shirley
** No change.
** 
**    Rev 1.19   24 Jan 1996 10:39:24   Shirley
** No change.
** 
**    Rev 1.18   23 Jan 1996 11:28:14   Shirley
** EasypPack/SLD Version 0.34c
** 
**    Rev 1.16   15 Jan 1996 16:17:26   Shirley
** No change.
** 
**    Rev 1.15   04 Jan 1996 11:12:00   Shirley
** EasyPack/SLD Version 0.34
** 
**    Rev 1.11   13 Nov 1995 09:28:16   Shirley
** No change.
** 
**    Rev 1.10   12 Nov 1995 11:30:06   Shirley
** No change.
** 
**    Rev 1.9   08 Nov 1995 16:33:20   Shirley
** No change.
** 
**    Rev 1.8   08 Nov 1995 12:43:38   Shirley
** No change.
** 
**    Rev 1.7   02 Nov 1995 10:02:36   Shirley
** No change.
** 
**    Rev 1.6   27 Oct 1995 16:48:32   Shirley
** No change.
** 
**    Rev 1.5   27 Oct 1995 13:46:34   Shirley
** No change.
** 
**    Rev 1.4   25 Oct 1995 14:30:38   Shirley
** EasyPack/SLD Version 0.1f
** 
**    Rev 1.1   29 Sep 1995 09:50:44   Shirley
** No change.
** 
**    Rev 1.0   20 Sep 1995 10:54:20   Shirley
** Initial revision.
** 
**    
** 
** 
**
**
**
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name:  MYLIST.H
//
//  Description:The header file of main list for Peripheral window
//
//  Author:     Jerry Yan
//
//  Date:       09/18/95
//
//  Modification:
//
//      1. 09/18/95, Initial version 
//
//
//  Copyright (C) 1995 Microtek International. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////
/*
#define PERI_BITITEM    0x80000000
#define PERI_EXPANDED   0x40000000
#define PERI_ADDR		0x0000ff00
#define PERI_VALUE		0x000000ff
#define PERI_STRING     0x0fff0000
#define PERI_ADDR_OFFSET    8
#define PERI_VALUE_OFFSET   0
#define PERI_STRING_OFFSET  16     
*/

#ifndef _MYLIST_H_
#define _MYLIST_H_

struct PERI_DRAWDATA
{
	BOOL isBit;
	BOOL isExpanded;
	UINT StringID;
	unsigned char chVal;
	char Addr[4];
	int  Index;
	unsigned char offset;  
};	
	
/////////////////////////////////////////////////////////////////////////////
// CMyList window

class CMyList : public CListBox
{
// Construction
public:
	CMyList(CWnd*);

// Attributes
public:
   CBitmap *m_pCloseBmp;
   CBitmap *m_pOpenBmp;
// Operations
public:   
   void InsertBitItem(int reg_index,PERI_DRAWDATA*);
   void DeleteBitItem(int reg_index,PERI_DRAWDATA*);   
   BOOL InitList();
// Implementation
public:
	virtual ~CMyList();
    void ResetContent();
protected:
    void DrawLine(CDC *pDC,PERI_DRAWDATA*lpData,CRect rect,BOOL) ;
	// Generated message map functions
	//{{AFX_MSG(CMyList)
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg  void OnLButtonUp(UINT nFlags,CPoint point);
	//}}AFX_MSG                                
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
	DECLARE_MESSAGE_MAP()
};

#endif
/////////////////////////////////////////////////////////////////////////////
