Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEnable Combo Pin
balajeedurai1-Nov-04 21:17
balajeedurai1-Nov-04 21:17 
QuestionSDI Main Frame positioning? Pin
kriaz1-Nov-04 19:21
kriaz1-Nov-04 19:21 
QuestionHow to retrieve public folders list in an exchange server Pin
lavanm1-Nov-04 18:45
lavanm1-Nov-04 18:45 
QuestionHow to create Web Interface using MFC Program Pin
pubududilena1-Nov-04 18:16
pubududilena1-Nov-04 18:16 
AnswerRe: How to create Web Interface using MFC Program Pin
alex.barylski1-Nov-04 20:00
alex.barylski1-Nov-04 20:00 
AnswerRe: How to create Web Interface using MFC Program Pin
Michael P Butler1-Nov-04 23:54
Michael P Butler1-Nov-04 23:54 
GeneralGDIPlus cast *Image to Bitmap Pin
Nicholas Cardi1-Nov-04 17:12
Nicholas Cardi1-Nov-04 17:12 
Questionhow to get char (or) string from comport Pin
vc-programmer-1-Nov-04 16:43
vc-programmer-1-Nov-04 16:43 
i have serial class library.
i use read data function.
this is following.

//Serial.cpp
////////////////////////
int CSerial::ReadData( void *buffer, int limit )
{

if( !m_bOpened || m_hIDComDev == NULL ) return( 0 );

BOOL bReadStatus;
DWORD dwBytesRead, dwErrorFlags;
COMSTAT ComStat;

ClearCommError( m_hIDComDev, &dwErrorFlags, &ComStat );
if( !ComStat.cbInQue ) return( 0 );

dwBytesRead = (DWORD) ComStat.cbInQue;
if( limit < (int) dwBytesRead ) dwBytesRead = (DWORD) limit;

bReadStatus = ReadFile( m_hIDComDev, buffer, dwBytesRead, &dwBytesRead, &m_OverlappedRead );
if( !bReadStatus )
{
if( GetLastError() == ERROR_IO_PENDING )
{
WaitForSingleObject( m_OverlappedRead.hEvent, 2000 );

return( (int) dwBytesRead );
}
return( 0 );
}

return( (int) dwBytesRead );

}

//testdlg.cpp
////////////////////////////

char lpBuffer[500];
int nBytesRead = serial.ReadData(lpBuffer, 500);


m_receivebyte=nBytesRead;

CString m_strreceive;
m_strreceive.Format("%d",nBytesRead);

if (m_receivebyte!=0)
{
AfxMessageBox("Receive Data "+m_strreceive);
}
/////////////////////////////

i want to know how to get string data from comport.
(for example - please enter string)
now,i receive only int data
(for example - 123)
please answer my application problems..
AnswerRe: how to get char (or) string from comport Pin
jan larsen2-Nov-04 0:49
jan larsen2-Nov-04 0:49 
GeneralCreating an array of classes... Pin
viru_lent1-Nov-04 13:51
viru_lent1-Nov-04 13:51 
GeneralRe: Creating an array of classes... Pin
GDavy2-Nov-04 1:48
GDavy2-Nov-04 1:48 
GeneralRe: Creating an array of classes... Pin
viru_lent2-Nov-04 4:21
viru_lent2-Nov-04 4:21 
General? about wav files Pin
tom_dx1-Nov-04 13:42
tom_dx1-Nov-04 13:42 
GeneralRe: ? about wav files Pin
KRowe1-Nov-04 16:56
KRowe1-Nov-04 16:56 
GeneralGetting the size of a block of code Pin
Xzyx987X1-Nov-04 12:34
Xzyx987X1-Nov-04 12:34 
GeneralRe: Getting the size of a block of code Pin
Andrew Walker1-Nov-04 15:21
Andrew Walker1-Nov-04 15:21 
GeneralRe: Getting the size of a block of code Pin
Xzyx987X1-Nov-04 21:44
Xzyx987X1-Nov-04 21:44 
GeneralRe: Getting the size of a block of code Pin
jan larsen2-Nov-04 0:57
jan larsen2-Nov-04 0:57 
GeneralRe: Getting the size of a block of code Pin
Maximilien2-Nov-04 2:47
Maximilien2-Nov-04 2:47 
GeneralRe: Getting the size of a block of code Pin
jan larsen2-Nov-04 3:29
jan larsen2-Nov-04 3:29 
GeneralRe: Getting the size of a block of code Pin
Anonymous2-Nov-04 7:49
Anonymous2-Nov-04 7:49 
GeneralThreading problem Pin
User 9148331-Nov-04 11:35
User 9148331-Nov-04 11:35 
GeneralRe: Threading problem Pin
Blake Miller2-Nov-04 7:59
Blake Miller2-Nov-04 7:59 
GeneralSplitter inside a Tab Window Pin
Ali Niaz1-Nov-04 11:17
Ali Niaz1-Nov-04 11:17 
GeneralRe: Splitter inside a Tab Window Pin
Selvam R2-Nov-04 3:01
professionalSelvam R2-Nov-04 3:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.