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

📄 probdlg.cpp

📁 一个2D电磁场FEM计算的VC++源程序
💻 CPP
字号:
// probdlg.cpp : implementation file
//

#include "stdafx.h"
#include "femme.h"
#include "probdlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// probdlg dialog


probdlg::probdlg(CWnd* pParent /*=NULL*/)
	: CDialog(probdlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(probdlg)
	m_frequency = 0.0;
	m_problem_note = _T("");
	m_precision = 1.e-8;
	m_depth = 1.0;
	m_minangle = 30.;
	//}}AFX_DATA_INIT
}


void probdlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(probdlg)
	DDX_Control(pDX, IDC_LENGTH_UNITS, m_length_units);
	DDX_Control(pDX, IDC_PROBTYPE, m_probtype);
	DDX_Text(pDX, IDC_EDIT_FREQ, m_frequency);
	DDX_Text(pDX, IDC_PROBNOTE, m_problem_note);
	DDX_Text(pDX, IDC_PRC, m_precision);
	DDV_MinMaxDouble(pDX, m_precision, 1.e-016, 1.e-008);
	DDX_Text(pDX, IDC_EDIT_DEPTH, m_depth);
	DDX_Text(pDX, IDC_MINANG, m_minangle);
	DDV_MinMaxDouble(pDX, m_minangle, 1., 33.8);
	//}}AFX_DATA_MAP
	DDX_Control(pDX, IDC_EDIT_FREQ, m_IDC_frequency);
	DDX_Control(pDX, IDC_EDIT_DEPTH, m_IDC_depth);
	DDX_Control(pDX, IDC_PROBNOTE, m_IDC_problem_note);
	DDX_Control(pDX, IDC_PRC, m_IDC_precision);
	DDX_Control(pDX, IDC_MINANG, m_IDC_minangle);
}


BEGIN_MESSAGE_MAP(probdlg, CDialog)
	//{{AFX_MSG_MAP(probdlg)
	ON_CBN_SELCHANGE(IDC_LENGTH_UNITS, OnSelchangeLengthUnits)
	ON_CBN_SELCHANGE(IDC_PROBTYPE, OnSelchangeProbtype)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// probdlg message handlers

BOOL probdlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_probtype.SetCurSel(probtype);
	if(probtype) m_IDC_depth.EnableWindow(FALSE);
	else m_IDC_depth.EnableWindow(TRUE);
	
	m_length_units.SetCurSel(lengthunits);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void probdlg::OnOK() 
{
	if (UpdateData()==FALSE) return;
	probtype=m_probtype.GetCurSel();
	if(probtype) m_depth=1;
	m_frequency=fabs(m_frequency);
	UpdateData(FALSE);
	lengthunits=m_length_units.GetCurSel();
	CDialog::OnOK();
}

void probdlg::OnSelchangeLengthUnits() 
{
	
}

void probdlg::OnSelchangeProbtype() 
{
	if(m_probtype.GetCurSel()) m_IDC_depth.EnableWindow(FALSE);
	else m_IDC_depth.EnableWindow(TRUE);	
}

⌨️ 快捷键说明

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