Solved

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

Posted on 1998-11-19
3
182 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
  • 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 100 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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.

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now