jtohdlg.cpp

来自「这个软件采用的是VC++语言」· C++ 代码 · 共 84 行

CPP
84
字号
// jtohDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Digihelper.h"
#include "jtohDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CjtohDlg dialog


CjtohDlg::CjtohDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CjtohDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CjtohDlg)
	m_jtohre = 0.0;
	m_jtohindu = 0.0;
	m_jtohinfen = 0.0;
	m_jtohinmiao = 0.0;
	//}}AFX_DATA_INIT
}


void CjtohDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CjtohDlg)
	DDX_Text(pDX, IDC_jtohre, m_jtohre);
	DDX_Text(pDX, IDC_jtohindu, m_jtohindu);
	DDX_Text(pDX, IDC_jtohinfen, m_jtohinfen);
	DDX_Text(pDX, IDC_jtohinmiao, m_jtohinmiao);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CjtohDlg, CDialog)
	//{{AFX_MSG_MAP(CjtohDlg)
	ON_COMMAND(ID_MENUITEM32778, OnMenuitem32778)
	ON_BN_CLICKED(IDchange, Onchange)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CjtohDlg message handlers

BOOL CjtohDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CjtohDlg::OnMenuitem32778() 
{
	// TODO: Add your command handler code here
	CjtohDlg dlg;
	dlg.DoModal();
	
}

void CjtohDlg::Onchange() 
{
	double jtohjinfen,jtohzfen,jtohjindu,jtohzdu;
	// TODO: Add your control notification handler code here
     UpdateData(TRUE);
	 //m_jtohre=(m_jtohin/180)*3.1415926;
	 
	 jtohjinfen=m_jtohinmiao/60;
	 jtohzfen=m_jtohinfen+jtohjinfen;
	 jtohjindu=jtohzfen/60;
	 jtohzdu=m_jtohindu+jtohjindu;
	 m_jtohre=(jtohzdu/180)*3.1415926;
	 UpdateData(FALSE);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?