// zyPrtLib_DemoDlg.h : Header
//

#pragma once
#include "zyPrtLib/CZyPrtLib.h"
#include "CButton/ShadeButtonST.h"
#include "afxwin.h"

// CzyPrtLib_DemoDlg is a dialog box
class CzyPrtLib_DemoDlg : public CDialog, public CZyPrtLib
{
// Constructor
public:
	CzyPrtLib_DemoDlg(CWnd* pParent = NULL);	// Standard constructor function

// Dialog box data
	enum { IDD = IDD_zyPrtLib_Demo_DIALOG };

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


// Implementation 
protected:
	HICON m_hIcon;

	// Generated massage mapping function 
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	
	afx_msg LRESULT OnOverHeat(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnOverHeatResume(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnOfPaper(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnOfPaperResume(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnAxoOpen(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnAxoClose(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnOverVoltage(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnOverVoltageResume(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnCutterOn(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnCutterOff(WPARAM wParam, LPARAM lParam);

	DECLARE_MESSAGE_MAP()
	
public:
	CStatic* m_pIcon;
	CComboBox m_combo_com;
	CComboBox m_combo_baud;
	CComboBox m_combo_flowctrl;

	CShadeButtonST m_btn_baud;	
	CShadeButtonST m_btn_com;
	CShadeButtonST m_btn_flowctrl;

	CShadeButtonST m_btn_paper;
	CShadeButtonST m_btn_heat;
	CShadeButtonST m_btn_axoopen;
	CShadeButtonST m_btn_overvoltage;
	CShadeButtonST m_btn_cutter;    

public:
	void InitLogo(void);
	void InitCbx(void);
	void InitCom(void);
	void InitBtn(void);

public:
	afx_msg void OnBnClickedCancel();
	afx_msg void OnBnClickedBtnCom();
	afx_msg void OnBnClickedBtnBaud();
	afx_msg void OnBnClickedBtnFlowctrl();

	afx_msg void OnBnClickedBtn1();
	afx_msg void OnBnClickedBtn2();
	afx_msg void OnBnClickedBtn3();
	afx_msg void OnBnClickedBtn4();
	afx_msg void OnBnClickedBtn5();
	afx_msg void OnBnClickedBtn6();
	afx_msg void OnBnClickedBtn7();
	afx_msg void OnBnClickedBtn8();
	afx_msg void OnBnClickedBtn9();
	afx_msg void OnBnClickedBtn10();
	afx_msg void OnBnClickedBtn11();

    afx_msg void OnBnClickedBtnSync();
};
