// opcespt4pvesdlg.cpp : implementation file // #include "stdafx.h" #include "geomative.h" #include "opcespt4pvesdlg.h" #include "floatedit.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // COpCESpt4PVESDlg dialog COpCESpt4PVESDlg::COpCESpt4PVESDlg(CWnd* pParent /*=NULL*/) : CDialog(COpCESpt4PVESDlg::IDD, pParent) { //{{AFX_DATA_INIT(COpCESpt4PVESDlg) m_unIterNum = 0; m_strStacking = _T("1"); //}}AFX_DATA_INIT } void COpCESpt4PVESDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(COpCESpt4PVESDlg) DDX_Control(pDX, IDC_SPT_A, m_edA); DDX_Control(pDX, IDC_SPT_B, m_edB); DDX_Text(pDX, IDC_4P_ITERNUM, m_strStacking); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(COpCESpt4PVESDlg, CDialog) //{{AFX_MSG_MAP(COpCESpt4PVESDlg) ON_WM_SHOWWINDOW() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // COpCESpt4PVESDlg message handlers void COpCESpt4PVESDlg::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 COpCESpt4PVESDlg::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 COpCESpt4PVESDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here GetDlgItem(IDC_4P_ITERNUM)->SetWindowText(_T("1")); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }