// DTMsrDemoDlg.h : header file
//

#pragma once

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

// Dialog Data
	enum { IDD = IDD_DTMSRDEMO_DIALOG };


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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
	afx_msg void OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/);
#endif
	DECLARE_MESSAGE_MAP()


protected:
	CComboBox m_port;
	CComboBox m_baud;
	CComboBox m_databits;
	CComboBox m_parity;
	CComboBox m_stopbits;

	CListBox m_listFormat;
	CComboBox m_ss;
	CComboBox m_es;

	CEdit m_msrData;

	TCHAR m_szTrackFormat[64][2];
	int m_nTrackFormat;

	CButton m_parseEnabel;



	afx_msg void OnDestroy();
	afx_msg void OnBnClickedButtonConnectMsr();
	afx_msg void OnBnClickedButtonRead();
	afx_msg void OnBnClickedButtonWrite();
	afx_msg void OnBnClickedButtonAdd();
	afx_msg void OnBnClickedButtonDel();
	afx_msg void OnBnClickedButtonWriteParseFormat();

public:
	void AddOutputInfo(CString info);
	void ShowErrMsg(int error);
	void UpdataPortParameters();
	static void TestRev(void *pBuf,long len);
	void EnableDlgItems(BOOL bEnable);


};
