M
meyzhong
Hi,
I am new to Visual C++ (6.0). I want to put all the print information
in different lines into a box.
I create a EDIT dialogue box, and then add a CString variable (m_MSG)
to the dialogue box to display the print information in the box.
However, the print information displayed in the box is in one line,
like this "10.0| 20.0". The "\n" character for the change to a new
line has not been recognized.
How to display the information into different lines in the box? Does
this "EDIT" box only allow a one-line string? Should I use any other
"Box"?
Looking forward to your help.
Regards,
James
The program is the following for the detailed information:
CTty3Dlg dlg;
m_pMainWnd = &dlg;
char textbuffer[40];
double t1= 10.0, t2=20.0;
sprintf(textbuffer, "%f\n",t1);
dlg.m_MSG = textbuffer;
sprintf(textbuffer, " %f", t2);
dlg.m_MSG = dlg.m_MSG + textbuffer;
int nResponse = dlg.DoModal();
I am new to Visual C++ (6.0). I want to put all the print information
in different lines into a box.
I create a EDIT dialogue box, and then add a CString variable (m_MSG)
to the dialogue box to display the print information in the box.
However, the print information displayed in the box is in one line,
like this "10.0| 20.0". The "\n" character for the change to a new
line has not been recognized.
How to display the information into different lines in the box? Does
this "EDIT" box only allow a one-line string? Should I use any other
"Box"?
Looking forward to your help.
Regards,
James
The program is the following for the detailed information:
CTty3Dlg dlg;
m_pMainWnd = &dlg;
char textbuffer[40];
double t1= 10.0, t2=20.0;
sprintf(textbuffer, "%f\n",t1);
dlg.m_MSG = textbuffer;
sprintf(textbuffer, " %f", t2);
dlg.m_MSG = dlg.m_MSG + textbuffer;
int nResponse = dlg.DoModal();