GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Aug-2005, 04:04
Amar Amar is offline
New Member
 
Join Date: Aug 2005
Posts: 1
Amar is on a distinguished road

Need help for string display in new line in Edit boxes


hi,
I am MFC beginner.
i am getting strings from somewhere & i want to display strings in edit box
line by line
for Example string "Astro" in one line
then in next new line "Adert12"
how can i write in new line.
can somebody tell me. or i hav to go for Rich edit boxes.
Pl. tell me .

Thank you
  #2  
Old 25-Aug-2005, 13:48
Dominic Dominic is offline
Member
 
Join Date: Aug 2005
Posts: 123
Dominic will become famous soon enough
Quote:
Originally Posted by Amar
hi,
I am MFC beginner.
i am getting strings from somewhere & i want to display strings in edit box
line by line
for Example string "Astro" in one line
then in next new line "Adert12"
how can i write in new line.
can somebody tell me. or i hav to go for Rich edit boxes.
Pl. tell me .

Thank you
I remeber that this didnt work for me once and I have no idea why. The new line character just didnt do anything. Still the code below certainly works for a static text box.

1. Use the resource editor to place a static text box on the dialog
2. Use class wizard to associated a CString variable to that resource
3. in my code I used :
DDX_Text(pDX, IDC_PROG_INFO, m_ProgramInfo);
4. Format the CString and use UpdateData(), the new lines should work
CPP / C++ / C Code:
dlgAbout.m_ProgramInfo.Format("%s\n",ProgramId);
dlgAbout.m_ProgramInfo += "Monitors the selected Device for SSF events and records\n";
dlgAbout.m_ProgramInfo += "them in an event list, whilst also showing the Device State \n";
dlgAbout.m_ProgramInfo += "\n";

... etc


 
 

Recent GIDBlogInstall Adobe Flash - Without Administrator Rights by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD Burner Help - Power Calibration Error.... JonBoy420 Computer Hardware Forum 111 19-Feb-2009 03:54
burning problems PLEASE PLEASE HELP kelticeire Computer Hardware Forum 4 01-Dec-2006 15:39
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28
CD Buring Failed skanth2000 Computer Hardware Forum 1 15-Nov-2003 03:52

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:16.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.