Solved

Text Area In MFC and Win32

Posted on 2001-09-02
7
1,100 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

11 Experts available now in Live!

Get 1:1 Help Now