School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,134 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,027 people online right now. Registration is fast and FREE... Join Now!




Problem with MFC RS232 communication

 

Problem with MFC RS232 communication, don't get the correct string

rolloff

7 Sep, 2009 - 01:08 AM
Post #1

New D.I.C Head
*

Joined: 7 Sep, 2009
Posts: 1

Hi there,

i use Visual C++ 6.0 MFC for Windows XP and making a software to receive a RFID-Tag from a microcontroller via RS232.

The MC transmits a String, for example: "ABC12345TEST-23456TEST-TAG-11112222345A"

i use this commands:

void CU10DiaDlg::OnOnCommMscomm1()
{
short evnt=m_commMSComm1Strg.GetCommEvent();
CString text;
...
case comEvReceive:
SetDlgItemText(IDC_EVENT,"RECEIVE detected!");
text=(m_commMSComm1Strg.GetInput()).bstrVal;
SetDlgItemText(IDC_RECEIVEWINDOW,text);
TRACE0("\n"+text);
break;

...


here the problem: IDC_RECEIVEWINDOW shows only the first 12-16 chars and switches to the next chars.

How can i represent the complete string in one line?

thx for help!
rolloff

This post has been edited by rolloff: 7 Sep, 2009 - 01:09 AM

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 02:48PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month