www.pudn.com > mfcopentree.rar > TransParaDlg.cpp


// TransParaDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "mfcopen.h" 
#include "TransParaDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CTransParaDlg dialog 
 
 
CTransParaDlg::CTransParaDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CTransParaDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CTransParaDlg) 
	m_ftranx = 0.0f; 
	m_ftrany = 0.0f; 
	m_ftranz = 0.0f; 
	m_ftimes = 1.0; 
	m_ftimestart = 1.0f; 
	m_ftimeend = 1.0f; 
	//}}AFX_DATA_INIT 
} 
 
 
void CTransParaDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CTransParaDlg) 
	DDX_Text(pDX, IDC_EDITX, m_ftranx); 
	DDX_Text(pDX, IDC_EDITY, m_ftrany); 
	DDX_Text(pDX, IDC_EDITZ, m_ftranz); 
	DDX_Text(pDX, IDC_EDIT3, m_ftimes); 
	DDX_Text(pDX, IDC_EDIT1, m_ftimestart); 
	DDV_MinMaxFloat(pDX, m_ftimestart, 0.1f, 1000.f); 
	DDX_Text(pDX, IDC_EDIT2, m_ftimeend); 
	DDV_MinMaxFloat(pDX, m_ftimeend, 0.1f, 1000.f); 
	//}}AFX_DATA_MAP 
} 
 
 
//	DDV_MinMaxFloat(pDX, m_ftimestart, 0.1f, 10000.0f); 
//	DDV_MinMaxFloat(pDX, m_ftimeend, 0.1f, 10000.f); 
 
BEGIN_MESSAGE_MAP(CTransParaDlg, CDialog) 
	//{{AFX_MSG_MAP(CTransParaDlg) 
	ON_WM_KEYDOWN() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CTransParaDlg message handlers 
 
BOOL CTransParaDlg::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
	 
	// TODO: Add extra initialization here 
	 
	UpdateData(FALSE); 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
} 
 
 
 
void CTransParaDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)  
{ 
	// TODO: Add your message handler code here and/or call default 
	switch(nChar) 
	{ 
	case VK_RETURN: 
		CDialog::OnOK(); 
		break; 
	}	 
	CDialog::OnKeyDown(nChar, nRepCnt, nFlags); 
}