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

📄 opsegdlg.cpp

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

#include "stdafx.h"
#include "femme.h"
#include "femmeDoc.h"
#include "OpSegDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// COpSegDlg dialog


COpSegDlg::COpSegDlg(CWnd* pParent /*=NULL*/)
	: CDialog(COpSegDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(COpSegDlg)
	m_linemeshsize = 0.0;
	m_automesh = FALSE;
	m_hide = FALSE;
	m_ingroup = 0;
	//}}AFX_DATA_INIT
}


void COpSegDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COpSegDlg)
	DDX_Control(pDX, IDC_ACKSEG, m_ackseg);
	DDX_Text(pDX, IDC_SEGGRP, m_ingroup);
	DDX_Text(pDX, IDC_LINEMESHSIZE, m_linemeshsize);
	DDX_Check(pDX, IDC_AUTOMESH, m_automesh);
	DDX_Check(pDX, IDC_SEGHIDE, m_hide);
	//}}AFX_DATA_MAP
	DDX_Control(pDX, IDC_SEGGRP, m_IDC_ingroup);
	DDX_Control(pDX, IDC_LINEMESHSIZE, m_IDC_linemeshsize);
}


BEGIN_MESSAGE_MAP(COpSegDlg, CDialog)
	//{{AFX_MSG_MAP(COpSegDlg)
	ON_BN_CLICKED(IDC_AUTOMESH, OnAutomesh)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COpSegDlg message handlers

void COpSegDlg::OnOK() 
{
	// TODO: Add extra validation here
	cursel=m_ackseg.GetCurSel();

	CDialog::OnOK();
}

BOOL COpSegDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CArray<CBoundaryProp,CBoundaryProp&> &lineproplist=*plineproplist;
	int i;

	// TODO: Add extra initialization here
	m_ackseg.AddString("<None>");
	for(i=0;i<lineproplist.GetSize();i++)
		m_ackseg.AddString(lineproplist[i].BdryName);

	m_ackseg.SetCurSel(cursel);
	OnAutomesh();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void COpSegDlg::OnAutomesh() 
{
	UpdateData();

	BOOL bEnable=TRUE;

	if (m_automesh==TRUE) bEnable=FALSE;

	SendDlgItemMessage(
		IDC_LINEMESHSIZE, // identifier of control
		WM_ENABLE,       // message to send
		(WPARAM) bEnable,  // first message parameter
		(LPARAM) 0   // second message parameter
	);
	if (m_automesh==TRUE){
		m_linemeshsize=0;
		SetDlgItemText(IDC_LINEMESHSIZE, "0" );
	}
}

⌨️ 快捷键说明

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