【正文】
第二個編輯框 UpdateData(FALSE)。}void CTEST1Dlg::OnSin() //正弦函數(shù)運算:sin(x) { // TODO: Add your control notification handler code here if(m_CDR == 1) { m_FDR=1。 //m_FDR單選框關聯(lián)變量,角度運算 } else { m_FDR=(2*PI)/360。 //弧度運算 } m_EDIT3_NUM=sin(m_EDIT1_NUM*m_FDR)。 GetDlgItem(IDC_EDIT2)ShowWindow(SW_HIDE)。 //在只有一個操作數(shù)時,隱藏第二個編輯框 UpdateData(FALSE)。}void CTEST1Dlg::OnCos() //余弦函數(shù)運算:cos(x){ // TODO: Add your control notification handler code here if(m_CDR == 1) { m_FDR=1。 } else { m_FDR=(2*PI)/360。 } m_EDIT3_NUM=cos(m_EDIT1_NUM*m_FDR)。 GetDlgItem(IDC_EDIT2)ShowWindow(SW_HIDE)。 //在只有一個操作數(shù)時,隱藏第二個編輯框 UpdateData(FALSE)。}void CTEST1Dlg::OnTan() //正切函數(shù)運算:tan(x){ // TODO: Add your control notification handler code here if(m_CDR == 1) { m_FDR=1。 } else { m_FDR=(2*PI)/360。 } m_EDIT3_NUM=tan(m_EDIT1_NUM*m_FDR)。 GetDlgItem(IDC_EDIT2)ShowWindow(SW_HIDE)。 //在只有一個操作數(shù)時,隱藏第二個編輯框 UpdateData(FALSE)。}void CTEST1Dlg::OnCot() //余切函數(shù)運算:cot(x){ // TODO: Add your control notification handler code here if(m_CDR == 1) { m_FDR=1。 } else { m_FDR=(2*PI)/360。 } m_EDIT3_NUM=1/tan(m_EDIT1_NUM*m_FDR)。 GetDlgItem(IDC_EDIT2)ShowWindow(SW_HIDE)。 //在只有一個操作數(shù)時,隱藏第二個編輯框 UpdateData(FALSE)。}void CTEST1Dlg::OnDegree() //選擇角度單制選框函數(shù){ // TODO: Add your control notification handler code here UpdateData(TRUE)。}void CTEST1Dlg::OnRad() //選擇弧度制單選框函數(shù){ // TODO: Add your control notification handler code here UpdateData(TRUE)。}void CTEST1Dlg::OnStatic2() { // TODO: Add your control notification handler code here UpdateData(FALSE)。}void CTEST1Dlg::OnUpdateEdit1Show() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialog::OnInitDialog() // function to send the EM_SETEVENTMASK message to the control // with the ENM_UPDATE flag ORed into the lParam mask. // TODO: Add your control notification handler code here //GetDlgItem(IDC_EDIT2)EnableWindow(TRUE)。 //激活編輯框 GetDlgItem(IDC_EDIT2)ShowWindow(SW_SHOW)。 //當?shù)谝粋€編輯框重新輸入數(shù)據(jù)時,重新顯示第二個編輯框 UpdateData(TRUE)。} 18