void CTry_4Dlg::OnBnClickedButton1() { { // TODO: Add your control notification handler code here UpdateData(true); double horsePower = 0.0; CString hP; horsePower = horsePower * 0.745699872; // conversion to kilowatts hP.Format(_T("%f"),horsePower); m_inputVariable.SetWindowText(hP); UpdateData(false); } void CTry_4Dlg::OnBnClickedButton3() { // TODO: Add your control notification handler code here UpdateData(true); double kiloWatts = 0; // initialize kiloWatts CString kW; kiloWatts = kiloWatts * 1.34102209; // conversion to horsepower kW.Format(_T("%f"),kiloWatts); m_inputVariable.SetWindowText(kW); UpdateData(false); } }
double
UpdateData(TRUE)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)