Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2006, 11:44 PM
Authorized User
 
Join Date: Apr 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default VC++: line break problem in edit box

Hi,

I am using ECC++ 4.0 and WinCE 4.2 emulator, I have create a unicode text file and the file contents is as below:
file content:
-----------
Testing123
Test456
Test789

I read the contents of the file and display in the multiline edit box. The result is as below:

Testing123#9633;Test456#9633;Test789#9633;

But this is not the result that I expect, how should I display in edit box as below:

Testing123
Test456
Test789

I had tried to use AfxMessageBox() to display the result and it give me the correct result.

Below is my code:
================================================== =======

CStudioFile f;
CString s;
char asciibuff[4096];

m_sListSerial = _T("");
if (f.Open(L"serialno.txt", CFile::modeRead | CFile::shareExclusive | CFile::typeText))
{
while(f.ReadString(s,true))
{
m_sListSerial += s;
}
f.Close();

AfxMessageBox(m_sListSerial);
WideCharToMultiByte(CP_ACP, 0, m_sListSerial, -1, asciibuff, 4096, NULL, NULL);

m_sSerialNo = asciibuff;
UpdateData (FALSE);
}

================================================== =======

Can someome please help. Thanks in advance.

Best Regards.

 
Old May 12th, 2006, 08:28 PM
Authorized User
 
Join Date: Apr 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

problem solved.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Line Break in CrossTab timothyc Crystal Reports 0 March 12th, 2008 09:25 PM
line break Cyber Shiva HTML Code Clinic 1 May 17th, 2007 06:04 AM
line break problem XSLT 1 February 20th, 2006 11:18 AM
Extra line Break kanchan_b XSLT 1 February 3rd, 2006 09:11 AM
break up line crmpicco Javascript How-To 1 June 6th, 2005 06:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.