Substract amount from the shop balance
Example code
try { double dVal; CString strSubVal; m_EditSubVal.GetWindowText(strSubVal); if(strSubVal!="") { try { #ifdef UNICODE dVal = wcstod((strSubVal), NULL); #else dVal=atof((LPCTSTR)strSubVal); #endif if(dVal<=0) { AfxMessageBox(_T("Please check the value you have entered")); return; } } catch(...) { AfxMessageBox(_T("Please enter a valid value")); return; } long lVal=m_IAccountsInterface->SubstractFromShopBalance(dVal); if(lVal>0) { AfxMessageBox(_T("Value successfully substracted from the shop balance")); } else { AfxMessageBox(_T("Failed to substract value from the shop balance")); } } else { AfxMessageBox(_T("Please enter value for substracting from the shop balance")); return; } } catch(...) { AfxMessageBox(_T("Error while substracting value from the shop balance")); }