?
Solved

how to display multi-lines in a dialog box using VC

Posted on 1998-11-19
3
Medium Priority
?
189 Views
Last Modified: 2010-04-01
I'm trying to display some string in a dialog box. I use the
 CString variable and UpdateData(FALSE) to do it. But I can not get multiple lines out. They are all in one line.
0
Comment
Question by:f22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1178254
Since it looks like you're using MFC and Visual C++, do the following:

- Open the dialog for editing in the resource editor
- Right click on the troublesome edit box
- Go to properties
- Go to one of the other tabs (something like More Styles) and select "multiple lines"
- Recompile

It should work now.  If you have any further questions, please feel free to ask.
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 300 total points
ID: 1178255
You will need to make sure that your lines are separated by \r\n and NOT \n\r.

The edit control will only use \r\n as the line separator.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1178256
Wouldn't that be better posted as comment?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question