104 lines
2.3 KiB
C++
104 lines
2.3 KiB
C++
// opcesptdipoledlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "opcesptdipoledlg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// COpCESptDIPOLEDlg dialog
|
|
|
|
|
|
COpCESptDIPOLEDlg::COpCESptDIPOLEDlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(COpCESptDIPOLEDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(COpCESptDIPOLEDlg)
|
|
m_unIterNum = 0;
|
|
m_strStacking = _T("1");
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void COpCESptDIPOLEDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(COpCESptDIPOLEDlg)
|
|
DDX_Control(pDX, IDC_SPT_B, m_edB);
|
|
DDX_Control(pDX, IDC_SPT_A, m_edA);
|
|
DDX_Text(pDX, IDC_ITER_NUM, m_strStacking);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(COpCESptDIPOLEDlg, CDialog)
|
|
//{{AFX_MSG_MAP(COpCESptDIPOLEDlg)
|
|
ON_WM_SHOWWINDOW()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// COpCESptDIPOLEDlg message handlers
|
|
|
|
void COpCESptDIPOLEDlg::OnShowWindow(BOOL bShow, UINT nStatus)
|
|
{
|
|
CDialog::OnShowWindow(bShow, nStatus);
|
|
|
|
// TODO: Add your message handler code here
|
|
int iN = (int)VAL_ZERO;
|
|
CString szLabel = _T("");
|
|
|
|
if (TRUE == bShow)
|
|
{
|
|
m_edA.SetIntLimitLen(5);
|
|
m_edA.SetDecLimitLen(2);
|
|
m_edA.SetWindowText(_T("0"));
|
|
|
|
m_edB.SetIntLimitLen(5);
|
|
m_edB.SetDecLimitLen(2);
|
|
m_edB.SetWindowText(_T("0"));
|
|
|
|
iN = 1;
|
|
// while (iN <= MAXN) //useless by waston
|
|
// while (iN <= 30) //useless by waston
|
|
// {
|
|
// szLabel.Empty();
|
|
// szLabel.Format(_T("%d"), iN);
|
|
//
|
|
// this->m_cbN.AddString(szLabel);
|
|
// iN++;
|
|
// }
|
|
// this->m_cbN.SetCurSel((int)VAL_ZERO);
|
|
}
|
|
}
|
|
|
|
BOOL COpCESptDIPOLEDlg::PreTranslateMessage(MSG* pMsg)
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_RETURN)
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_ESCAPE)
|
|
{
|
|
return TRUE;
|
|
}
|
|
return CDialog::PreTranslateMessage(pMsg);
|
|
}
|
|
|
|
BOOL COpCESptDIPOLEDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
// TODO: Add extra initialization here
|
|
GetDlgItem(IDC_ITER_NUM)->SetWindowText(_T("1"));
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|