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


// PrecisionDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "mfcopen.h" 
#include "PrecisionDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CPrecisionDlg dialog 
 
 
CPrecisionDlg::CPrecisionDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CPrecisionDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CPrecisionDlg) 
	m_fprecision = 0.05f; 
	//}}AFX_DATA_INIT 
} 
 
 
void CPrecisionDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CPrecisionDlg) 
	DDX_Text(pDX, IDC_EDIT1, m_fprecision); 
	DDV_MinMaxFloat(pDX, m_fprecision, 1.e-004f, 1.f); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CPrecisionDlg, CDialog) 
	//{{AFX_MSG_MAP(CPrecisionDlg) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CPrecisionDlg message handlers 
 
 
 
BOOL CPrecisionDlg::PreTranslateMessage(MSG* pMsg)  
{ 
	// TODO: Add your specialized code here and/or call the base class 
	if(pMsg->message == WM_KEYDOWN) 
	{ 
		UINT mes = (int)(pMsg->wParam); 
		if(mes == VK_RETURN) 
			CDialog::OnOK(); 
	}	 
	return CDialog::PreTranslateMessage(pMsg); 
}