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

📄 numericedit.h

📁 一个通过USB->UART读取C8051F060的程序
💻 H
字号:
#if !defined(AFX_NUMERICEDIT_H__89755D18_F5EC_4DE0_92B2_806E9BD897A7__INCLUDED_)
#define AFX_NUMERICEDIT_H__89755D18_F5EC_4DE0_92B2_806E9BD897A7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// NumericEdit.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CNumericEdit window
union   InnerVal
{
		int    nIVal;
		float  nFVal;
};


class CNumericEdit : public CEdit
{
// Construction
public:
	CNumericEdit();

// Attributes
public:
	int   m_nDotNum;
	int   m_nNegTag;

	void  SetRange(float fMinVal, float fMaxVal);
	void  SetRange(int  nMinVal, int  nMaxVal);

private:
	struct _tagInnerStruct
	{
			union   InnerVal  m_RngVal_Max;	//最大范围值
			union   InnerVal  m_RngVal_Min;	//最小范围值
			union   InnerVal  m_RngVal_Act;	//实际值
			short   sType;
	}m_sInnerObj;
	
	void   CheckRange();
// Operations
public:
    void  SetEnbl(BOOL bEnable = TRUE);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNumericEdit)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CNumericEdit();

	// Generated message map functions
protected:
	//{{AFX_MSG(CNumericEdit)
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
	BOOL    m_bEnable;
};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_NUMERICEDIT_H__89755D18_F5EC_4DE0_92B2_806E9BD897A7__INCLUDED_)

⌨️ 快捷键说明

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