/***************************************************************************
**
**    $Header:   D:/PICSLDV/SRC/LOG/DIAGNO/DIAGNOST.H__   1.14   09 Jan 1997 14:28:00   ZJRD  $
**
**    $Log:   D:/PICSLDV/SRC/LOG/DIAGNO/DIAGNOST.H__  $
** 
**    Rev 1.14   09 Jan 1997 14:28:00   ZJRD
** No change.
** 
**    Rev 1.13   13 Dec 1996 11:23:16   ZJRD
** No change.
** 
**    Rev 1.12   22 Nov 1996 11:04:12   ZJRD
** No change.
** 
**    Rev 1.11   11 Nov 1996 12:51:30   ZJRD
** No change.
** 
**    Rev 1.10   06 Nov 1996 13:03:06   ZJRD
** No change.
** 
**    Rev 1.9   02 Nov 1996 09:50:42   ZJRD
** No change.
** 
**    Rev 1.8   30 Oct 1996 12:53:20   ZJRD
** No change.
** 
**    Rev 1.7   28 Oct 1996 09:45:54   ZJRD
** PIC/SLD Version 0.92
** 
**    Rev 1.4   23 Sep 1996 10:40:08   ZJRD
** No change.
** 
**    Rev 1.3   06 Sep 1996 13:56:10   ZJRD
** PIC/SLD Version 0.60
** 
**    Rev 1.4.1.0   12 Aug 1996 11:06:20   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.2   05 Jun 1996 15:01:02   ZJRD
** EasyPack/SLD Version 1.96
** 
**    Rev 1.1   29 May 1996 09:43:02   ZJRD
** No change.
** 
**    Rev 1.0   16 May 1996 09:12:44   ZJRD
** Initial revision.
** 
****************************************************************************/
// diagnost.h : header file
//
//john chow 96.3
////////////////////////////////////////////////////////////////////////////
// CDiagnosticBox dialog
#ifndef _DIAGNOST_H
#define _DIAGNOST_H
#include "afxwin.h"
#include "afxext.h"
#include "resource.h"  
#include "meter.h" 
#include "contain.h"
#include "abiextfn.h"

#define IDC_METER 51000

class CDiagnosticBox : public CDialog
{
// Construction
public:
	CDiagnosticBox(CWnd* pParent = NULL);	// standard constructor
	~CDiagnosticBox();

// Dialog Data
	//{{AFX_DATA(CDiagnosticBox)
	enum { IDD = IDD_DIAGNOSTICBOX };
	CButton	m_C7;
	CButton	m_Button_Locate;
	CButton	m_CAll;
	CButton	m_C6;
	CButton	m_C5;
	CButton	m_C4;
	CButton	m_C3;
	CButton	m_C2;
	CButton	m_C1;
	CButton m_buttonDetail;
	CButton m_buttonQuit;
	CButton m_buttonDiagnostic;
	CString	m_S1;
	CString	m_S2;
	CString	m_S3;
	CString	m_S4;
	CString	m_S5;
	CString	m_S6;
	CString	m_S7;
	//}}AFX_DATA

//members                 
protected:
	WORD wTimerCounter[16];//defined for showing diagnosis percent 
	HINSTANCE hLib;    
	CMeterControl m_Meter;
	CBrush	m_br;
	UINT m_nTimerID;
	BOOL m_isCanTime;
	BYTE m_bCurrentStep; 
	CContainEx m_Function,m_Status,m_Error,m_ErrorCode; 
private:
	unsigned char m_cpOption[45];
	DIAGNORESULT m_Result;
	BOOL m_isDetail;	
	

// Implementation
private:
    void DecideDetailButtonStatus();
    void DecideDiagnosticButtonStatus();
    void SetMeter();
    void DeleteMeter();  
    BOOL ReadInfor();
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	// Generated message map functions
	//{{AFX_MSG(CDiagnosticBox)
	afx_msg void OnButtonDiagnostic();
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	virtual void OnCancel();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnButtonDetail();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnDestroy();
	afx_msg void OnPaint();
	afx_msg void OnButtonLocate();
	afx_msg void OnUnit1();
	afx_msg void OnUnit2();
	afx_msg void OnUnit3();
	afx_msg void OnUnit4();
	afx_msg void OnUnit5();
	afx_msg void OnCheck1();
	afx_msg void OnCheck2();
	afx_msg void OnCheck3();
	afx_msg void OnCheck4();
	afx_msg void OnCheck5();
	afx_msg void OnCheck6();
	afx_msg void OnCheckall();
	afx_msg void OnSelchangeCombo2();
	afx_msg void OnEditchangeCombo2();
	afx_msg void OnCheck7();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
#endif
///////////////////////////END OF FILE //////////////////////////////////
