
/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/FLDDLG.H__   1.8   20 Jun 1996 09:24:58   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/FLDDLG.H__  $
** 
**    Rev 1.8   20 Jun 1996 09:24:58   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.6   10 Jun 1996 10:19:36   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.4   29 May 1996 09:28:46   ZJRD
** No change.
** 
**    Rev 1.3   16 May 1996 09:06:02   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:10:30   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:28:08   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.29   18 Apr 1996 12:59:00   Shirley
** No change.
** 
**    Rev 1.28   12 Apr 1996 10:39:08   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.26   15 Feb 1996 08:52:46   Shirley
** No change.
** 
**    Rev 1.25   12 Feb 1996 14:10:38   Shirley
** No change.
** 
**    Rev 1.24   06 Feb 1996 15:30:28   Shirley
** No change.
** 
**    Rev 1.23   06 Feb 1996 13:44:48   Shirley
** EasyPack/SLD Version 0.36
** 
**    Rev 1.16   15 Jan 1996 16:15:56   Shirley
** No change.
** 
**    Rev 1.15   04 Jan 1996 11:06:54   Shirley
** No change.
** 
**    Rev 1.14   30 Nov 1995 09:07:26   Shirley
** No change.
** 
**    Rev 1.13   28 Nov 1995 15:28:24   Shirley
** EasyPack/SLD Version 0.32
** 
**    Rev 1.11   13 Nov 1995 09:21:02   Shirley
** No change.
** 
**    Rev 1.10   12 Nov 1995 11:27:28   Shirley
** EasyPack/SLD Version 0.24
** 
**    Rev 1.9   08 Nov 1995 16:27:12   Shirley
** No change.
** 
**    Rev 1.8   08 Nov 1995 12:38:56   Shirley
** No change.
** 
**    Rev 1.7   02 Nov 1995 10:01:42   Shirley
** EasyPack/SLD Version 0.21
** 
**    Rev 1.1   29 Sep 1995 09:52:04   Shirley
** No change.
** 
**    Rev 1.0   20 Sep 1995 10:54:18   Shirley
** Initial revision.
** 
**    
** 
** 
**
**
**
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name:  FLDDLG.H
//
//  Description:The header file of dialog box 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.
//
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// CFldDlg dialog

class CFldDlg : public CDialog
{                     

private:
    CRect m_GridRect;
    CSize m_DefCellSize;
    int   m_nAbnormal[8] ;
// Construction
public:
	CFldDlg(CWnd* pParent ,int index);	// standard constructor
    CWnd* m_pParent;         
    CVBControl* m_pGrid;
    int m_nIndex;     //current seleted item in the list box
    int m_nFldMax;    // the maxime value of the current field.
    int m_nRegVal;
    int m_nRegid;      // the order number of current peripheral register.
    BOOL m_bCanClose;
    void SetDlgList(int);
    void SetEdit(int fldid);  
    void SetGrid(int regvalue);
    void GridInit(int regid);   
      /////////////////jerry 11-1////////////////////////////	
    afx_msg void OnRegValKillFocus();
    afx_msg void OnFieldValKillFocus();
 ////////////////////////////////   


// Dialog Data
	//{{AFX_DATA(CFldDlg)
	enum { IDD = IDD_FIELDDLG };
	CString	m_nFldVal;
	CString	m_RegVal;
	//}}AFX_DATA

// Implementation 
private: 
    void CaluGridRect(CDC* pDC);
    void GridSetName(CDC* pDC ); 
    void DrawFrame(CDC * pdc, CRect rect,UINT flag);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CFldDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangeFieldList();
	afx_msg void OnNextButt();
	afx_msg void OnPrevButt();
	afx_msg void OnCloseButt();
	afx_msg void OnWriButt();
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnSetfocusRegVal();
	afx_msg void OnSetfocusFieldList();
	afx_msg void OnSetfocusFieldVal();
	afx_msg void OnDestroy();
	afx_msg void OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
