#include "resource.h"
class CSrcGroupDlg ;
class CLODialog;
/////////////////////////////////////////////////////////////////////////////
// CArrowMsgDlg dialog

class CArrowMsgDlg : public CDialog
{
// Construction
public:
	CArrowMsgDlg(CRect rect,UINT ID,BOOL bUp,CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CArrowMsgDlg)
	enum { IDD = IDD_ARROWMSG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation  
private:
    CRect rectMsg;
    UINT  stringID; 
    BOOL  m_bUpper;
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CArrowMsgDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC *pDC);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	virtual void OnCancel();
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CMsgDlg dialog

class CMsgDlg : public CDialog
{
// Construction
public:
	CMsgDlg(BOOL bOk,int &nExiID,UINT StringID,int nCount=NULL,CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMsgDlg)
	enum { IDD = IDD_MESSAGE };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
private:
    BOOL m_bOk;
    int  *m_pExitID;
    UINT m_StringID;
    int  m_nCount;
    
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CMsgDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg void OnNo();
	virtual void OnOK();
	afx_msg void OnYes();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CTDialog dialog

class CTDialog : public CDialog
{
// Construction
public:
	CTDialog(UINT IDD ,CWnd* pParent = NULL,
	         BOOL bModal=1,BOOL bChild=0,BOOL bSetByUse=TRUE);	// standard constructor
// Dialog Data
	//{{AFX_DATA(CTDialog)
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
protected:
    BOOL     m_bModal;
    BOOL     m_bChild;
    BOOL     m_bSetByUse;
    UINT     m_uFocus;//10,11 set focus 20,22 Kill focus 
    
//tutorial controler
public:                        
    virtual  BOOL Check(){return 1;};
    BOOL     GetModal(){return m_bModal;};
//    void SetEditText(CEdit *pEdit,/*UINT uID,*/LPSTR lpText);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CTDialog)
	afx_msg void OnNcMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnNcLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnNcLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnNcLButtonUp(UINT nFlags, CPoint point);
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	virtual void OnOK();
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CMapDlg dialog

class CMapDlg : public CTDialog
{
// Construction
public:
	CMapDlg(CWnd* pParent = NULL,BOOL bModal=1);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMapDlg)
	enum { IDD = IDD_MAPDLG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// tutorial
public:
    void SetEditText1();
	void SetEditText2();
	void SetCombo1();
	void SetCombo2(); 
	void SetRadioButton(); 
    void SetSetBtn(BOOL bDown);
    void SetSaveBtn(BOOL bDown);
    void SetCloseBtn(BOOL bDown);
    void SetListBox();
    virtual BOOL Check();      

// Implementation
private:
    CTEdit     *pEdit1;
    CTEdit     *pEdit2;
    CTComboBox *pCombo1;
    CTComboBox *pCombo2;
    CTListBox  *pListBox;
    CTButton   *pRadio1;
    CTButton   *pRadio2;
    CTButton   *pSetBtn;
    CTButton   *pSaveBtn;
    CTButton   *pRestoreBtn;
    CTButton   *pCloseBtn;
    CTButton   *pHelpBtn;
    BOOL       m_bClkSet; 
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
    void OnDelete();
	// Generated message map functions
	//{{AFX_MSG(CMapDlg)
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	afx_msg void OnMapClose();
	afx_msg void OnHelp();
	afx_msg void OnMapAdd();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CLoadFileDlg dialog

class CLoadFileDlg : public CFileDialog
{
// Construction
public:
	CLoadFileDlg(CWnd* pParent = NULL,BOOL bModal=1,BOOL *pbOK=NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CLoadFileDlg)
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
protected:
    virtual BOOL Check();
private:
    CTEdit  *pEdit1;
    CButton *pOkBtn;
    CButton *pOptionBtn;
    CButton *pNetworkBtn;
    CButton *pCancelBtn;
    CButton *pHelpBtn;
    BOOL     m_bModal;
    char     m_szPath[50]; 
    UINT     m_uFocus; 
    BOOL     *m_pbOK;
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
    void OnDelete();
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	// Generated message map functions
	//{{AFX_MSG(CLoadFileDlg)
	afx_msg void OnNcLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnNcLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnNcLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnNcMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLoadOk();
	afx_msg void OnOption();
	afx_msg void OnListDLK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CNMLoadDlg dialog

class CNMLoadDlg : public CTDialog
{
// Construction
public:
	CNMLoadDlg(CWnd* pParent = NULL);	// standard constructor
    enum { IDD = IDD_LOADDLG };
// Dialog Data
	//{{AFX_DATA(CNMLoadDlg)
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
private:
    CTEdit       *pEdit1;
    CTButton     *pOkBtn;
    CTButton     *pOptionBtn;
    CTButton     *pNetworkBtn;
    CTButton     *pCancelBtn;
    CTButton     *pHelpBtn;
    CTStatic     *pStatic1;
    CTStatic     *pStatic2;
    CTStatic     *pStatic3;
    CTStatic     *pStatic4;    
    CLODialog    *m_pSrcDlg;
    char         m_szPath[50]; 
    void OnDelete();
    
public:
    void SetEditText1();
    void SetOptionBtn(BOOL bDown);
    CLODialog *GetSrcDlg(){return m_pSrcDlg;};
    void SetRCodeMsg(); 	
	void SetRSymbol();
    void SetRDemand();
    void SetRStatus();
    void SetRWarn();
    void SetOkBtn();
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CNMLoadDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnCancel();
	afx_msg void OnLoadOption();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CSrcGroupDlg dialog
/*
class CSrcGroupDlg : public CTDialog
{
// Construction
public:
	CSrcGroupDlg(int nTab,BOOL bChild,CWnd* pParent=NULL,
	             BOOL bModal=1,BOOL bSetByUse=TRUE);//CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CSrcGroupDlg)
	enum { IDD = IDD_LOAD };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
private:
    BOOL     bPageShow;
    
private:
	CVBControl *m_pvbxTab;
	int        m_nTab;  
private:
//0	
	CTButton   *m_pRCode;
	CTButton   *m_pRSymbol;
	CTButton   *m_pRStatus;
	CTButton   *m_pRDemand;
	CTButton   *m_pRWarn;
	CTButton   *m_pOkBtn;
//5
	CTComboBox  *m_pBkFunction;
	CTComboBox  *m_pBkModule;
	CTEdit      *m_pBkAddress;
	CTListBox   *m_pBkSymbol;
	CTButton    *m_pBkAdd;
	CTButton    *m_pBkEnable;
	CTButton    *m_pBkDisable;
	CTButton    *m_pBkDelete;
	CTButton    *m_pBkDelAll;
	CTButton    *m_pRestoreBtn;
	CTButton    *m_pSaveBtn;
	CTButton    *m_pCloseBtn;
	
public:
	void SetRCodeMsg(); 	
	void SetRSymbol();
    void SetRDemand();
    void SetRStatus();
    void SetRWarn();
    void SetOkBtn();
    
    void IntroduceBk(int nStep);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
    void ShowTabCtrl(int nTab,BOOL bShow);   
    void InitTabCtrl(int nTab);
    void GetTabCtrl();
    void DeleteCtrl(int nPage);
	// Generated message map functions
	//{{AFX_MSG(CSrcGroupDlg)
	afx_msg void OnTabpageshownSrctab(UINT, int, CWnd*, LPVOID);
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	virtual void OnOK();
	afx_msg void OnSrcgrp6Add();
	afx_msg void OnSrcgrp6Del();
	afx_msg void OnSrcgrp6Delall();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
*/
/////////////////////////////////////////////////////////////////////////////
// CLoadStatusDlg dialog
class CLoadStatusDlg : public CTDialog
{
// Construction
public:
	CLoadStatusDlg(CWnd* pParent = NULL,BOOL bModal=NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CLoadStatusDlg)
	enum { IDD = IDD_LOADPROG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
private:             
    UINT     m_uCount; 
    CBitmap  *m_pBitmap;
    CTStatic *pStatus;
private:
    void InitItem();
    void DeleteItem();
    void LoadStatus(int nTimes);
public:
    void TimeCurMDL(int nTimes);
    void TimeByte(int nTimes);
    void TimeMDL(int nTimes);
    void TimeSYM(int nTimes);
    void TimeType(int nTimes);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual void PostNcDestroy();
	virtual void OnCancel();
	// Generated message map functions
	//{{AFX_MSG(CLoadStatusDlg)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CLODialog dialog

class CLODialog : public CTDialog
{
// Construction
public:
	CLODialog(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CLODialog)
	enum { IDD = IDD_LOAD };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

private:
    CBitmap    m_Bitmap;
	CTButton   *m_pRCode;
	CTButton   *m_pRSymbol;
	CTButton   *m_pRStatus;
	CTButton   *m_pRDemand;
	CTButton   *m_pRWarn;
	CTButton   *m_pOkBtn;

public:
	void SetRCodeMsg(); 	
	void SetRSymbol();
    void SetRDemand();
    void SetRStatus();
    void SetRWarn();
    void SetOkBtn();
    void DeleteCtrl();
    
// Implementation
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CLODialog)
	afx_msg void OnPaint();
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CBPDialog dialog

class CBPDialog : public CTDialog
{
// Construction
public:
	CBPDialog(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CBPDialog)
	enum { IDD = IDD_BP };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA
	
private:	
    CBitmap     m_Bitmap;
	CTComboBox  *m_pBkFunction;
	CTComboBox  *m_pBkModule;
	CTEdit      *m_pBkAddress;
	CTListBox   *m_pBkSymbol;
	CTButton    *m_pBkAdd;
	CTButton    *m_pBkEnable;
	CTButton    *m_pBkDisable;
	CTButton    *m_pBkDelete;
	CTButton    *m_pBkDelAll;
	CTButton    *m_pRestoreBtn;
	CTButton    *m_pSaveBtn;
	CTButton    *m_pCloseBtn;
	
public:	
    void IntroduceBk(int nStep);
    void DeleteCtrl();

// Implementation
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CBPDialog)
	virtual void OnCancel();
	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
