Solved

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

Posted on 1998-11-19
3
188 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 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

696 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