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
Solved

Text Area In MFC and Win32

Posted on 2001-09-02
7
1,150 Views
Last Modified: 2013-11-20
I was wondering how can I add a text area control into a dialog based application by using mfc and win32 approached ?I don't see any text area control in the resource editor tool.

text area - the area that can display text and will have scroll bar when the area is full of text)
0
Comment
Question by:yccheok
7 Comments
 
LVL 2

Accepted Solution

by:
xu2000 earned 50 total points
ID: 6449637
Hi,
Why not EditBox?
Set Stytle: check Multiline and uncheck AutoHscoll and check VerticalScoll

Xu
0
 
LVL 3

Expert Comment

by:kulina
ID: 6449639
It's called Edit Box in VC++. Click on that  ab| button on controls grid. Draw the edit box on the dialog. Select it, right click and select "Properties". Under "Styles" check "Multiline". Hope this helps.
0
 

Author Comment

by:yccheok
ID: 6475706
This help. However, i was wondering how do i add text to the edit box since every time the box can only display one line of text ?
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 
LVL 3

Expert Comment

by:kulina
ID: 6475719
>>Under "Styles" check "Multiline"
0
 

Author Comment

by:yccheok
ID: 6481434
I already did that but don't know what function can used to add multiline :
I have a edit control  (I am using c/sdk) which i tend to make it as text area to display my program message. the control has properties as:
vertical scroll, auto vscroll, want return.

I was wondering how can i add text in multiple line. for instance, i use
char *buf1 = "hello\r\n";
char *buf2 = "hai\r\n";
SendMessage(GetDlgItem(hDlg, IDC_CON_CON), WM_SETTEXT, 0, (LPARAM) buf1);

SendMessage(GetDlgItem(hDlg, IDC_CON_CON), WM_SETTEXT, 0, (LPARAM) buf2);

it can only display
hai

where i want
hello
hai


Pls help. If possible, do e-mail the solution to my mail box
yccheok@yahoo.com

since i don't have any internet access in this few day and it may take my sometimes to search back my message :)

thanks

regards
yccheok

0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9531980
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: xu2000

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

837 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