⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 seg7dlg.h

📁 12864 avr驱动程序
💻 H
字号:
// SEG7Dlg.h : header file
//
#include "inirw.h"

#if !defined(AFX_SEG7DLG_H__2B05EDC0_A819_480E_BEFF_0E8DCB382DAC__INCLUDED_)
#define AFX_SEG7DLG_H__2B05EDC0_A819_480E_BEFF_0E8DCB382DAC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//////////////////////////////////////////////////////////////////////////////
class CUSTOM_INIRW : public INIRW
{
protected:
 virtual void InitFile(void);//重载初始化INI文件的内容
};

/////////////////////////////////////////////////////////////////////////////
// CSEG7Dlg dialog

class CSEG7Dlg : public CDialog
{
// Construction
public:
	CSEG7Dlg(CWnd* pParent = NULL);	// standard constructor
	virtual void OnOK(void);
	virtual void OnCancel();
	BOOL CheckPinErr(void); //自定义的函数,用来检测Combo 是否正确,并且绘制一个图标在上面
	BOOL ReadConfig(const char* ConfigFile); //读取INI配置文件
	void ReDrawSeg(long i); //重绘指定的LED段
	void ResetCheckCtl(void); //重设检查按钮的状态
	unsigned char CreateLedData(void); //创建LED数据
	void FormatData(CString& buf, unsigned int Radix);

    enum RadixOpt //基数定义
	{
      HEX = 0x00,
      BIN = 0x01,
	  DEC = 0x02,
	};


// Dialog Data
	BOOL check_char[19]; //控件数组要放在微软件注释外,否则类向导不能再用

	//{{AFX_DATA(CSEG7Dlg)
	enum { IDD = IDD_SEG7_DIALOG };
	CEdit	edit_output;
	CEdit	edit_note;
	CButton	Button_Set;
	CButton	Button_Auto;
	CButton	Button_Clear;
	CButton	Button_Copy;
	CButton	Button_Mal;
	CButton	Button_ResetPin;
	CButton	Button_Save;
	CButton	Button_SavePin;
	CComboBox	combo_language;
	CComboBox	combo_ledak;
	CComboBox	combo_h;
	CComboBox	combo_g;
	CComboBox	combo_f;
	CComboBox	combo_e;
	CComboBox	combo_d;
	CComboBox	combo_c;
	CComboBox	combo_b;
	CComboBox	combo_a;
	int		a_index;
	int		b_index;
	int		c_index;
	int		d_index;
	int		e_index;
	int		f_index;
	int		g_index;
	int		h_index;
	int		language_index;
	int		ledak_index;
	CString	note_string;
	CString	output_string;
	int		opt_radix;
	int		check_selectall;
	BOOL	check_uppercase;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSEG7Dlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	//自定义变量
	BOOL PinErrFlag; //指出一个管脚错误的标志
    CPen pen_blue;  //线宽为1的蓝色笔  
    CBrush brush_red; //红色实心刷子
	CBrush brush_white; //白色实心刷子
	CBrush brush_yellow; //黄色实心刷子
	CBrush brush_blue; //蓝色实心刷子
    CBrush brush_null; //空的背景刷子
	CBrush brush_bkcolor; //背景色的刷子

    CString lag_start_ch; //语言起始字符
	CString lag_separator_ch; //数据分隔符
	CString lag_hex_leader_ch; //十六进制数据头
	CString lag_hex_end_ch; //十六进制数据尾
	CString lag_bin_leader_ch; //二进制数据头
	CString lag_bin_end_ch; //二进制数据尾
	CString lag_dec_leader_ch; //十进制数据头
	CString lag_dec_end_ch; //十进制数据尾
	CString lag_note_leader_ch; //注释头
	CString lag_note_end_ch; //注释尾
	//int opt_radix; //语言默认基数



	// Generated message map functions
	//{{AFX_MSG(CSEG7Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);// 响应WM_LBUTTONDOWN消息的函数
    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnBtnAuto();
	afx_msg void OnBtnResetPin();
	afx_msg void OnBtnCopy();
	afx_msg void OnSelchangeCombo1();
	afx_msg void OnSelchangeCombo2();
	afx_msg void OnSelchangeCombo3();
	afx_msg void OnSelchangeCombo4();
	afx_msg void OnSelchangeCombo5();
	afx_msg void OnSelchangeCombo6();
	afx_msg void OnSelchangeCombo7();
	afx_msg void OnSelchangeCombo8();
	afx_msg void OnSetfocusEditNote();
	afx_msg void OnSelchangeCombo9();
	afx_msg void OnSelchangeCombo10();
	afx_msg void OnBtnSet();
	afx_msg void OnChkNumber();
	afx_msg void OnChkCharA();
	afx_msg void OnChkScharB();
	afx_msg void OnChkCharC();
	afx_msg void OnChkScharC();
	afx_msg void OnChkScharD();
	afx_msg void OnChkCharE();
	afx_msg void OnChkCharF();
	afx_msg void OnChkCharH();
	afx_msg void OnChkScharH();
	afx_msg void OnChkCharL();
	afx_msg void OnChkCharN();
	afx_msg void OnChkScharN();
	afx_msg void OnChkScharO();
	afx_msg void OnChkCharP();
	afx_msg void OnChkScharR();
	afx_msg void OnChkScharT();
	afx_msg void OnChkCharU();
	afx_msg void OnChkCharLine();
	afx_msg void OnChkSelectall();
	afx_msg void OnBtnClear();
	afx_msg void OnBtnMal();
	afx_msg void OnChkUppercase();
	afx_msg void OnRadioHex();
	afx_msg void OnRadioBin();
	afx_msg void OnRadioDec();
	afx_msg void OnBtnSave();
	afx_msg void OnBtnSavePin();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); //拦截系统处理消息函数
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SEG7DLG_H__2B05EDC0_A819_480E_BEFF_0E8DCB382DAC__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -