rsistor.h

来自「计算分压电阻的阻值」· C头文件 代码 · 共 77 行

H
77
字号
#if !defined(AFX_RSISTOR_H__588CCBE8_D8B0_4A93_975D_1536B0610CD1__INCLUDED_)
#define AFX_RSISTOR_H__588CCBE8_D8B0_4A93_975D_1536B0610CD1__INCLUDED_

#define K 1000.0
#define M 1000000.0
#define R_table_5_m 18
#define R_table_5_n 10
#define R_table_1_m 60
#define R_table_1_n 10
#define GOOD_NUM 100


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




/////////////////////////////////////////////////////////////////////////////
// CRsistor dialog

class CRsistor : public CDialog
{
// Construction
public:
	void OnOK();
	BOOL OnInitDialog();
	double ConvertFromR(CString str);
	CString DispersionToPercent(CString str, double dispersion, double ratio);
	CString ConvertToR(CString str, double r);
	int ransack(struct R_search* pR_search, double ratio);
	CString ftos(CString str, double num);
	void stoa(char* target, CString str);
	float stof(CString str);
	CRsistor(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CRsistor)
	enum { IDD = IDD_DIALOG_R };
	CComboBox	m_CR_Percision;
	CEdit	m_CDisplay;
	CString	m_SR1_Value;
	CString	m_SR2_Value;
	CString	m_SR1_Min;
	CString	m_SR1_Max;
	CString	m_SR2_Max;
	CString	m_SR2_Min;
	CString	m_SDispersion_Range;
	CString	m_SBenchmark;
	//}}AFX_DATA


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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CRsistor)
	afx_msg void OnBUTTONCalculate();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_RSISTOR_H__588CCBE8_D8B0_4A93_975D_1536B0610CD1__INCLUDED_)

⌨️ 快捷键说明

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