C++ and STL
  Common Issues
  Destructor
  regex
  string
 MFC
  CButton
  CDialog
  CEdit
  CInternetSession
  CWinThread
  CWnd
 MS VS FAQ
  Compiling, building
  Debugging
  Editor
  Settings
 Win32, API
  Console
  File System
  Graphics
  Internet functions
  Kernel objects
  Security
  Sound
  Thread, process
  Window
 Windows NT/2K*
  Logon, logoff...
  Networking
  Service Packs
 | About
  About
  Links & Freeware

Powered by
CoderTown



How to add new line to multiline edit box?

New line character "\n" is not enough here! Add two chars "\r\n". And do not forget to set Multiline property check box (or ES_MULTILINE) in edit control properties. Example:

	m_string += "Text line 1\r\n";
	m_string += "Text line 2\r\n";
	// ...
	m_Edit1.SetWindowText(m_String);

Created: 2003-05-13
Updated: 2003-05-13

Google
 
Web visualcpp.net
msdn.microsoft.com codeguru.com