multiline Edit control question

Hello,

I have an EDIT control on my dialog. On init I would like to put some text
to this control.

I override OnInitDialog method where I use SetWindowText("") method on the
control to send some text.

If the control is multiline, is it possible to put more than one line to the
control using one of CEdit's methods?

Thank you in advance for help,

Tomek


0
tb3953 (4)
2/20/2004 9:36:24 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
302 Views

Similar Articles

[PageSpeed] 42

"TB" <tb@amt.pl> skrev i en meddelelse
news:c14kea$23c2$1@news2.ipartners.pl...
> Hello,
>
> I have an EDIT control on my dialog. On init I would like to put some text
> to this control.
>
> I override OnInitDialog method where I use SetWindowText("") method on the
> control to send some text.
>
> If the control is multiline, is it possible to put more than one line to
the
> control using one of CEdit's methods?
>
> Thank you in advance for help,
>
> Tomek
>


Add a newline character (\n) every time you need to change line, e.g
m_EditControl.SetWindowText(_T("Line1\nLine2\nLine3"));

-- 
Bjarne Nielsen



0
2/20/2004 9:43:24 AM
Use /r/n to insert a line break. In addition, make sure you have he multi-line style
turned on.

-- 
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"TB" <tb@amt.pl> wrote in message news:c14kea$23c2$1@news2.ipartners.pl...
| Hello,
|
| I have an EDIT control on my dialog. On init I would like to put some text
| to this control.
|
| I override OnInitDialog method where I use SetWindowText("") method on the
| control to send some text.
|
| If the control is multiline, is it possible to put more than one line to the
| control using one of CEdit's methods?
|
| Thank you in advance for help,
|
| Tomek
|
|

0
ajaykalra (6840)
2/20/2004 9:45:26 AM
I used \n\r and it didn't work..... I don't know why I haven't try \r\n...
:-)

Now it works,

Thank you very much,

Tomek



Uzytkownik "Ajay Kalra" <ajaykalra@yahoo.com> napisal w wiadomosci
news:ei6gFZ59DHA.1424@TK2MSFTNGP12.phx.gbl...
> Use /r/n to insert a line break. In addition, make sure you have he
multi-line style
> turned on.
>
> -- 
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
>
>
> "TB" <tb@amt.pl> wrote in message news:c14kea$23c2$1@news2.ipartners.pl...
> | Hello,
> |
> | I have an EDIT control on my dialog. On init I would like to put some
text
> | to this control.
> |
> | I override OnInitDialog method where I use SetWindowText("") method on
the
> | control to send some text.
> |
> | If the control is multiline, is it possible to put more than one line to
the
> | control using one of CEdit's methods?
> |
> | Thank you in advance for help,
> |
> | Tomek
> |
> |
>


0
tb3953 (4)
2/20/2004 9:52:46 AM
If you're using the VC++ IDE, click on the control, right click and choose
properties.  Make sure you have the Multiline checked.

KS

"TB" <tb@amt.pl> wrote in message news:c14lcv$23u0$1@news2.ipartners.pl...
> I used \n\r and it didn't work..... I don't know why I haven't try \r\n...
> :-)
>
> Now it works,
>
> Thank you very much,
>
> Tomek
>
>
>
> Uzytkownik "Ajay Kalra" <ajaykalra@yahoo.com> napisal w wiadomosci
> news:ei6gFZ59DHA.1424@TK2MSFTNGP12.phx.gbl...
> > Use /r/n to insert a line break. In addition, make sure you have he
> multi-line style
> > turned on.
> >
> > -- 
> > Ajay Kalra [MVP - VC++]
> > ajaykalra@yahoo.com
> >
> >
> > "TB" <tb@amt.pl> wrote in message
news:c14kea$23c2$1@news2.ipartners.pl...
> > | Hello,
> > |
> > | I have an EDIT control on my dialog. On init I would like to put some
> text
> > | to this control.
> > |
> > | I override OnInitDialog method where I use SetWindowText("") method on
> the
> > | control to send some text.
> > |
> > | If the control is multiline, is it possible to put more than one line
to
> the
> > | control using one of CEdit's methods?
> > |
> > | Thank you in advance for help,
> > |
> > | Tomek
> > |
> > |
> >
>
>


0
ks2057 (125)
2/20/2004 3:39:00 PM
Reply:

Similar Artilces:

Question about an error
I'm getting the following error in a field: #Name? What am I doing that's causing this error? The Help contains the following: #Error? or #Name? may appear in a control for a number of reasons. To correct the problem, do the following: � Make sure that the field specified in the control's ControlSource property hasn't been removed from the underlying table, query, or SQL statement. � Check the spelling of the field name in the control's ControlSource property. � If you specified an expression in the control's ControlSource property, make sure that there is an e...

Small Business edition to deluxe ed.
Is it possible to "downgrade" versions of money? I currently am running small business edition, but have decided I don't want to use it to run my company's finances just personal, therefore deluxe would be fine, plus it is cheaper. Is there a way to get all of the personal data into deluxe from SBE? I really don't want to reenter 10+ years of investment data. -brian In microsoft.public.money, sarge_53186@yahoo.com wrote: >Is it possible to "downgrade" versions of money? I currently am >running small business edition, but have decided I don't wan...

Subquery works..2 questions to learn more
Thanks to Allen Browne, and general reading of the other Posts, I have a Top 5 Aggregate Query working, but I'd like to learn more. 1.... If I use the name of the Aggregate Query in the Subquery, it runs, but much slower than making that Aggregate Query a Table (which I've read before, while it works, is discouraged). Is this observation I've noted the way it is when using an Aggregate Query as a Subquery? 2.. If the Top 5 results are 7, 6, 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 then all the 3s are displayed...they are a tie for 5th place...any way to display onl...

control arrow in editing
I have always used CONTROL + left or right arrow to move along document lines but all of a sudden this no longer works. Are there any settings I may have accidently changed and how can I get it back. This is driving me crazy. Without knowing more about your equipment and environment, it's hard to say. If you're using a laptop, for example, it's possible that some function lock combination has altered how your computer is interpreting the arrow keys. It's also possible that you've activated a different keyboard language, and that has changed the key def...

Make box control not visible based on condition
I have created my own tabs using boxes and subforms. However, I would like one of the "tabs" or the box that makes the tab (as well as the unassociated label) not visible on the event that a particular field is empty ([Notes]). I've played around with this in the OnCurrent event, but have been unsuccessful. Any ideas? Thanks in advance! magmike You could try setting the control based on the value of the particular field as follows: me.tab.visible=not isnull(me.particular field) '-where particular field = your fieldname you should also place this in the after update of...

2 questions re:Rollup 2 installation
I've seen a couple of comments regarding my first question, but I'm looking for confirmation: 1. After installing the server portion of Rollup 2, do all client PCs have to be updated before they attempt to use CRM? Or can I update the most important ones first, then get to the rest ASAP? 2. Does the client portion of Rollup 2 have to be installed while logged in as the end-user? Thanks for any guidance! Ryk McDorman #1 upgrading the client is optional but recommended. #2 installing the rollup update 2 on the client only requires to close the Outlook. "Ryk" <Ryk@...

Question about Call Tracking design of form
Hi, I am working on a call tracking module. I’ve seen Microsoft’s temp and it does not help. I have the following tables: tblCustomer 1 record per customer Key: CustAcctNo Flds: Name Address, etc. tblCall 1 record per customer per call “subject’. May take multiple actual calls to resolve issue. Multiple calls per customer. Key: CallNo Flds: CustAcctNo CallOpenDt CallPurpose CallCloseDt - If field is null, call is open, otherwise it is closed...

Junk Mail Question
OL2007 offers an option to mark a 'Sender's Domain to the Safe Senders List' in the Junk-Mail tools. How does one mark a domain to the baddies list for permanent dispatch to hell? With spammers frequently using fraud prefixes but often the same domain, I would imagine that it is essential to be able to blacklist a domain. Does OL2007 not offer that? You should be able to add a whole domain here in Outlook: Actions menu > Junk E-mail > Junk Email options > Blocked Senders tab "ClueLess" <ganz@schrott.com> wrote in message news:O3QYHcqnIHA.1052@TK2...

How to get an edit control with flat style( no 3d borders)
Select the Edit control in the resource editor and goto its properties. Select the Style tab and remove the Border style. -- Cheers Check Abdoul [ VC++ MVP ] ----------------------------------- "Jeff Huang" <jeff_hh@msn.com> wrote in message news:eC7xa42TDHA.1552@TK2MSFTNGP10.phx.gbl... > > ...

GL Edit List and VAT
How can I show on GL Edit lists the VAT enties created using the VAT entry button on the GL Transaction entry window? I couldn't work out what new table relationships were require. Thanks ...

Upgrade from Money 2005 Standard edition to Money 2008 editions
I have Money 2005 standard edition and I would to upgrade to Money 2008. Can someone tell me which Money 2008 editions (essential, plus, deluxe) can accept Money 2005 standard edition files? For example, will I be able to upgrade/convert Money 2005 Standard edition files if I purchase Money 2008 Essential. Thanks. In microsoft.public.money, nedcpa@yahoo.com wrote: >I have Money 2005 standard edition and I would to upgrade to Money >2008. Can someone tell me which Money 2008 editions (essential, plus, >deluxe) can accept Money 2005 standard edition files? You need Money Plus Deluxe ...

Tooltips don't appear in Crystal Report Viewer Control in VC6/7
Could someone kindly tell me how I can view tooltips created in Crystal Reports 8.5 using a Crystal Report Control (NOT the Crystal Report Viewer Control) ActiveX Object in VC++. Currently I am able to view the crystal reports using the Crystal Report Control from a Dialog based VC++ application, but I have been unsuccessful in making the tooltips appear (even though the tooltips appear fine when opening the report using the crystal report software) Any help will be greatly appreciated. Thanks in advance. CD ...

View a control's name
In 2003 the control name was always visible when I clicked on the control. Now In 2007 I don't see the control name. I can find it but is there a way to have it show all the time ? Hi Kruppy, They sort of hid it. The control name (and type) is always shown in the very top of the properties window. You can also choose a particular control from that location. Of course if you close the properties window, as I often do, it no longer shows. There does not appear to be any way to customize the ribbon to put it back. Anyone know different? Clifford Bass ...

Return address question
Greetings and happy new year, I have 3 accounts set up in Outlook 2003. 2 are hotmail and one is a web server I use for my business. The pop3, web server account, is set for default. Problem; When I send a business e-mail using my pop3 account, during my send tests to my hotmail account or pop3 account, the header (e-mail properties) will say it came from my hotmail account. Also, when I do send out my e-mails to my business clients, when they answer with a return, it comes back to my hotmail account. Question: Is there any way I can make the e-mail say it came from my business( pop3)? Thank...

question regarding transaction log files
Does the transaction log file (E000X.log) contain the contents of emails sent or received by a user or it just contains information regarding emails. The reason i am asking this is that incremental backup will only backup the transaction log files, not the databases. My concern is that if i perform a Normal backup on Monday and then perform incremental backup for the rest of the week and then i have a database crash during the week, will I be able to restore emails received to the database after the last Normal backup? Thanks. if you do a weekly fulll, and then a nightly incremental,...

editing email address
I switched over to Gmail from Juno. I made some mistakes in the email addresses that I switched over and want to edit them to make them correct. >From reading how to do it, I understand that it is not allowable. If that is so, then I don't think I want to use Gmail. People get married or change email servers without changing their email name. So what's the deal? Lois lois.granny@gmail.com wrote: > I switched over to Gmail from Juno. I made some mistakes in > the email addresses that I switched over and want to edit them > to make them correct. > >> From rea...

sumif array question
I have a list of sales from last year by invoice date. What I'm tryin to do is compare a running total of this years sales to date to las years sales to date. I will need a fomula that will give me a total o where we are to today's date last year. I also need the formula to en at the end of each month. Thanks in advance B -- Message posted from http://www.ExcelForum.com ...

Windows server standard edition sp 1 to update to sp2
hi, I have Windows server standard edition sp 1 I try my best to update this version to Windows server standard edition sp 2 but I cant update because the mgs. saying windows server sp 2 not install plese help to solve this promblem faizal wrote: > I have Windows server standard edition sp 1 I try my best to update > this version to Windows server standard edition sp 2 but I cant > update because the mgs. saying windows server sp 2 not install > plese help to solve this promblem Windows Server what? 2000? 2003? 2008? 32-bit? 64-bit? R2? Start button --> ...

Increasing Size of Controls on Dialog
Hi I am developing a dialog application and have found that i would like to increase the size of some controls so that they are bigger as they look quite small. e.g i have some radio buttons that i would like to make bigger. Do i have to do this at run time rather than design time? If i increase the dimensions of an edit box in the dialog editior the text stays the same as it was when i originally put the edit box on the dialog. Can anyone tell me how i can increase the text so it is in proportion to the size of the edit box I suppose my general question is how i can make the contents of th...

Newsletter question #2
Someone in an organization I belong to has taken over doing our group's newsletter and is using Publisher. I'm not familiar with it, but my "job" is proofreading her work for grammar and spelling. The particular question I have for this NG (I just subscribed) has to do with columns. The previous editor had the name of the group all the way across the page at the top. Likewise the name (and description) of the speaker for our meeting. This new editor has the speaker's description in two of four columns on the left with other information in two right hand column...

Adding Helptext for edit controls
When i used vc++ version 6 i remember you could add help text for a control that would appear on the screen when you hovered the mouse over it. How can you get this functionality working in vc++ .net version? Look Like you are Looking for ToolTips look for CToolTipCtrl class or take a look at this article http://www.codeproject.com/dialog/windowtip.asp -- With Regards Alok Gupta Visit me at http://alok.bizhat.com "I think this will Help" "Chris Baker" <ChrisBaker@discussions.microsoft.com> wrote in message news:5AF95006-87D7-49A7-B6...

Using InStr on form control
Hi, I have this bit of code: Dim myText As Variant, i As Long If Not IsNull(Me.mktAreaCombo) Or Me.mktAreaCombo = "" Then If InStr(Me.mktAreaCombo, "...") > 0 Then MsgBox "... Detected!" myText = Split(Me.mktAreaCombo, "...") For i = LBound(myText) To UBound(myText) MsgBox myText(i) Next i Else strWhere = strWhere & "([mktArea] = " & Me.Controls("mktAreaCombo") & ") AND " MsgBox "No ..." ...

Edit Links to Files Powerpoint 2007
I have a couple of Powerpoint presentations with graphs where the data is linked to an Excel spreadsheet. At one point when I opened the presentation I received a message (Microsoft Office Powerpoint Security Notice) asking if I want to update the links. Now however, not only do I not receive the message allowing me to update the links, but the Edit Links to files option has disappeared from my Office menu. I can update the graphs by opening each one individually (if the Excel file is open) but I have a few hundred slide to update on a regular basis and would like to have it auto...

Another question about Tax functionality
Thank you Peter for your answer to my question, I now have a couple more. Do you know if there are plans to add this feature to the product? I know if I were a CRM user that is a feature I would expect to be included. Would a consultant be able to add a special field to the forms that could do this calculation and add it to the total? Babs I have seen a summary of the "roadmap" (planned enhancements) as it stood about 3 months ago, and tax does not seem to be there. Of course, things may have changed or I may have missed it A good consultant would be able to customise ...

Viewing/Editing list of previous recipients in Entourage 2004
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop A few &quot;previous recipients&quot; are displayed in the To and CC fields of a message being composed in Entourage 2004. Apple Mail provides easy access to the full list for editing. Does Entourage also allow viewing and editing of this list? ...