I'm working with MFC Aplication in Visual Studio 2013 and i want to format a variable CString to appear in columns in a edit control box.
I already add a variable CString to the edit control box, but i can't format the text to appear in columns.
This is my code:
val=_T("column1 column2 column3")
cycle for
val.Format(val+_T("%-15ls%-20s%-15ls"),val1,val2,val3);
val = val + _T("\r\n");
end of cicle for
That code is in a For cycle where val1,val2 and val3 are CStrings variables and change in each iteration.
My result is this:
colum1 colum2 colum3
hello world transform ice cream
hello google pizza
my name is Ze transform ice cream
And i want:
colum1 colum2 colum3
hello world transform ice cream
hello google pizza
my name is Ze transform ice cream
can you help me?