Making a table using SetWindowText
I am trying to display some text in my ceditview-derived class using SetWindowText. However, I want to display some coordinates in a tabular form, such as:
X Y
23.3 22.1
0.5 1.3
100.2 32.8
and so on. I was trying to using CString::Format, and like fiddling around with the precision (something like %15.3f"), but I can't seem to get it to work. Any suggestions on how I might achieve this tabular form (O, if you can't tell, I want the X and Y centered on the 2 "columns", and the numbers to be right-justified as I have tried to show, thnx).
PS: Before, I was trying to add spaces using for loops, so that in essence I was justifying it myself, but they didn't seem to work, as I think the font is not fixed-width. Maybe someone has some idea of how to change the font used by SetWindowText to a fixed-font width?