Solved

Text Area In MFC and Win32

Posted on 2001-09-02
7
1,120 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Running shell command from Access 3 69
Complete beginner needs help making a cron job 9 110
if loop in java 3 130
viewing source code from eclipse 13 89
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 …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

861 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

24 Experts available now in Live!

Get 1:1 Help Now