// bankinit.h : main header file for the BANKINIT application
//

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CBankinitApp:
// See bankinit.cpp for the implementation of this class
//

class CBankinitApp : public CWinApp
{
public:
	CBankinitApp();
    
// Overrides
	virtual BOOL InitInstance();
    virtual int ExitInstance();
// Implementation

	//{{AFX_MSG(CBankinitApp)
	afx_msg void OnAppAbout();
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CBankInit dialog

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

// Dialog Data
	//{{AFX_DATA(CBankInit)
	enum { IDD = IDD_BANK_INIT };
	int		m_nHighBit;
	int		m_nHighPort;
	int		m_nLowPort;
	int		m_nLowBit;
	//}}AFX_DATA

public:
    int     m_nComOrSep;
    int     m_nComBank;
    int     m_nSepBank;
    int     m_nLowSignal;
    int     m_nHighSignal;
    
    CString m_strWinPath;
    CString m_strIniFile;
    void EnableComOpt(BOOL bEnable);
    void EnableSepOpt(BOOL bEnable);
    void EnableA16(BOOL bEnable);
    void EnableA17(BOOL bEnable);
    void GetBankInfoFromIni();
    BOOL IsValueValid(int value, int min, int max);
    void CheckSignalButton(BOOL flag);
// Implementation
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CBankInit)
	afx_msg void OnCom();
	afx_msg void OnSep();
	virtual void OnOK();
	afx_msg void OnCom1();
	afx_msg void OnCom2();
	afx_msg void OnCom4();
	afx_msg void OnSep1();
	afx_msg void OnSep2();
	virtual BOOL OnInitDialog();
	afx_msg void OnHighDisable();
	afx_msg void OnHighEnable();
	afx_msg void OnLowDisable();
	afx_msg void OnLowEnable();
	afx_msg void OnHelp();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
