www.pudn.com > Digihelper.rar > gcspDlg.cpp


// gcspDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "Digihelper.h" 
#include "gcspDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CgcspDlg dialog 
 
 
CgcspDlg::CgcspDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CgcspDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CgcspDlg) 
	m_gcsps = 0.0; 
	m_gcsps2 = 0.0; 
	//}}AFX_DATA_INIT 
} 
 
 
void CgcspDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CgcspDlg) 
	DDX_Text(pDX, IDC_gcsps, m_gcsps); 
	DDX_Text(pDX, IDC_gcsps2, m_gcsps2); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CgcspDlg, CDialog) 
	//{{AFX_MSG_MAP(CgcspDlg) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CgcspDlg message handlers 
 
void CgcspDlg::OnOK()  
{ 
	// TODO: Add extra validation here 
	 
		UpdateData(TRUE); 
	m_gcsps2=((m_gcsps/6371000)*(m_gcsps/6371000)/3)*m_gcsps; 
	UpdateData(FALSE); 
}