Tuesday, August 10, 2010

Visual C++, exe file

1) in debug directory
C:\Users\owner\Documents\Visual Studio 2010\Projects\ExoBar\Debug

Microsoft Visual C++ 2008 Redistributable Package (x86)

how to Deploy a setup and deployment project


------------------------------------------------------------
Test example
http://www.functionx.com/visualc/applications/netprice.htm
Two notices:
a) In Project Property, not use unicode
b) void CNetPriceDlg::OnBnClickedBtnCalculate()
Call UpdateData() first.

This is my event handler in MC++ 2010:


void CNetPriceDlg::OnBnClickedBtnCalculate()
{
// TODO: Add your control notification handler code here
// TODO: Add your control notification handler code here
double MarkedPrice, TaxRate, TaxAmount, NetPrice;

UpdateData();

MarkedPrice = atof(m_MarkedPrice);
TaxRate = atof(m_TaxRate) ;

TaxAmount = MarkedPrice * TaxRate;
NetPrice = MarkedPrice + TaxAmount;

UpdateData(TRUE);
m_TaxAmount.Format("$%.2f", TaxAmount);
m_NetPrice.Format("$%.2f", NetPrice);

MessageBox("MarkerdPrice",m_MarkedPrice);
MessageBox("TaxRate",m_TaxRate);
MessageBox("TaxAmount",m_TaxAmount);
UpdateData(FALSE);


}

No comments:

Post a Comment