Here is a function that does exactly what you asked:

double str2float(CString str)
{
CString strFloat = str;
CString strInt = "";
CString strZecim = "0";
BOOL bZecim = FALSE;
for(int c=0; c<strFloat.GetLength(); c++){
if(strFloat[c] == ',' && !bZecim){
bZecim = TRUE;
strZecim = "";
}
if(!bZecim){
if(strFloat[c] >= '0' && strFloat[c] <= '9')
strInt += strFloat[c];
}
else{
if(strFloat[c] >= '0' && strFloat[c] <= '9')
strZecim += strFloat[c];
}
}
strFloat = strInt + "." + strZecim;
return (double)atof(strFloat);
}


Regards,
Dani Zilcsak
mailto[email protected]