I would appreciate some advice on how to do the following. It seemed trivial, but I quickly got tangled up with the various formats for wide strings, a lot of the Embarcadero information turned out to be for Pascal, I’m working with C++ builder. And there are a number of different wide string formats.
I am displaying double values on the canvas, the following obviously works fine:
Label1 -> Caption = DoubleVal ;
But I got into trouble when I wanted to constrain the display precision, there doesn’t appear to be a setting for the display object and just truncating the field width would be visually unappealing. So I applied the setprecision function with a stringstream output…..
ostringstream oss ;
oss << setprecision (4) << DoubleVal; // This works
How do I go from the stringstream to the GUI? Or is there a more direct approach?