Using TextOut() to align positive & negative numbers

I'm trying to align a number of floating point values using TextOut() function but not winning because i use it in a loop to display various numbers passed to it as strings i.e ... "35.78". Problem is these floating numbers can either be positive or negative... TextOut uses coordinates meaning the '-' sign forms part of the coordinate x:y, which pushes the number following the sign a little far to the right i.e if i display "-3.56" below 3.56 using the same coordinates, the numbers won't be aligned nicely... With printf() one can use formatted output such as "%-20lf" and so forth...

Is there a way i can achieve this? I believe i may opt to use a number designated function like SetDlgItemInt().. but need one for floating numbers
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!