Solved

Text Area In MFC and Win32

Posted on 2001-09-02
7
1,195 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
[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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

695 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