htojdlg.cpp

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

CPP
62
字号
// htojDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Digihelper.h"
#include "htojDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// ChtojDlg dialog


ChtojDlg::ChtojDlg(CWnd* pParent /*=NULL*/)
	: CDialog(ChtojDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(ChtojDlg)
	m_htojin = 0.0;
	m_htojredu = 0;
	m_htojrefen = 0;
	m_htojremiao = 0;
	//}}AFX_DATA_INIT
}


void ChtojDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(ChtojDlg)
	DDX_Text(pDX, IDC_htojin, m_htojin);
	DDX_Text(pDX, IDC_htojredu, m_htojredu);
	DDX_Text(pDX, IDC_htojrefen, m_htojrefen);
	DDX_Text(pDX, IDC_htojremiao, m_htojremiao);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(ChtojDlg, CDialog)
	//{{AFX_MSG_MAP(ChtojDlg)
	ON_BN_CLICKED(IDhtojchange, Onhtojchange)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// ChtojDlg message handlers

void ChtojDlg::Onhtojchange() 
{
	// TODO: Add your control notification handler code here
	double htojz;
	UpdateData(TRUE);
	htojz=(m_htojin*180)/3.1415926;
		m_htojredu=int(htojz);
		m_htojrefen=int((htojz-m_htojredu)*60);
		m_htojremiao=int(((htojz-m_htojredu)*60-m_htojrefen)*60);
		UpdateData(FALSE);
}

⌨️ 快捷键说明

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