Hi,
I'm having the following problem converting 0.000025 and other numbers with 0.0000xx format to a string and populating a list control with the value. I'm retrieving the information from a database
Here is the code I'm using in my PopulatList(). I works with 1.0000025.
void CTransactionSet:opulateListControl(CListCtrl *pList)
{
int decimal, sign;
double dbValue = 0.0023;
CString strBuyerBrokerCommission;
CString strValue, strInt,strDecimal;
strValue = _fcvt(this->m_BuyerBrokerCommission,
6,&decimal, &sign);
strInt = strValue.Left(decimal);
strDecimal = strValue.Mid(decimal);
strBuyerBrokerCommission.Format("%s.%s",strInt,strDecimal);
pList->SetItemText(NextItem,3,strBuyerBrokerCommission);
}
I'm having the following problem converting 0.000025 and other numbers with 0.0000xx format to a string and populating a list control with the value. I'm retrieving the information from a database
Here is the code I'm using in my PopulatList(). I works with 1.0000025.
void CTransactionSet:opulateListControl(CListCtrl *pList)
{
int decimal, sign;
double dbValue = 0.0023;
CString strBuyerBrokerCommission;
CString strValue, strInt,strDecimal;
strValue = _fcvt(this->m_BuyerBrokerCommission,
6,&decimal, &sign);
strInt = strValue.Left(decimal);
strDecimal = strValue.Mid(decimal);
strBuyerBrokerCommission.Format("%s.%s",strInt,strDecimal);
pList->SetItemText(NextItem,3,strBuyerBrokerCommission);
}