Why don't you simply do the following:
CString FmtValues (double stdlat)
{
CString s;
s.Format (_T("%.21f"), stdlat);
return s;
}
A double variable is passed by value, so the const is superfluous. And as Richard pointed out: There should be only one percent sign, not two!
And why 21 decimals? The double type gives you 15 to 17 significant decimal digits. Everything above that is overkill.