Click here to Skip to main content
15,908,775 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Formated Input Pin
Rajesh R Subramanian12-Feb-08 21:40
professionalRajesh R Subramanian12-Feb-08 21:40 
GeneralCButton Ugly border Pin
sarat12-Feb-08 21:04
sarat12-Feb-08 21:04 
GeneralRe: CButton Ugly border Pin
Iain Clarke, Warrior Programmer12-Feb-08 23:59
Iain Clarke, Warrior Programmer12-Feb-08 23:59 
QuestionRe: CButton Ugly border Pin
David Crow13-Feb-08 3:06
David Crow13-Feb-08 3:06 
GeneralRe: CButton Ugly border Pin
Iain Clarke, Warrior Programmer13-Feb-08 3:42
Iain Clarke, Warrior Programmer13-Feb-08 3:42 
GeneralWaitCommEvent() and new line Pin
rp_suman12-Feb-08 21:00
rp_suman12-Feb-08 21:00 
GeneralRe: WaitCommEvent() and new line Pin
Cedric Moonen12-Feb-08 21:05
Cedric Moonen12-Feb-08 21:05 
GeneralRe: WaitCommEvent() and new line Pin
rp_suman12-Feb-08 21:34
rp_suman12-Feb-08 21:34 
Hi, Sorry, WaitCommEvent() returns "false" and its 2nd parameter set to value RX_CHAR(i.e, 1)
and the ReadFile() function gives the new line character in its 2nd parameter.

Best Regards,
Suman


code snippet is here:
<br />
    if(!SetCommMask(serialObj.m_hCom, EV_RXCHAR | EV_TXEMPTY)) <br />
		return ERRCODE;<br />
<br />
    while(serialObj.m_hCom != NULL)<br />
	{<br />
		BOOL bRet = WaitCommEvent( serialObj.m_hCom, &dwCommEvt, &serialObj.comReader );<br />
		<br />
		if ( dwCommEvt & EV_RXCHAR ) {<br />
<br />
			do {<br />
				retval = ReadFile( serialObj.m_hCom, &lpBuff, 1, &dwRead, &serialObj.comReader );<br />
	        <br />
				if( retval && dwRead > 0 ) {   <br />
     <br />
 							//code stuff..<br />
							....<br />
							SetEvent(serialObj.hReadEvent);<br />
						}<br />
				}<br />
			} while( dwRead > 0 );<br />
		}<br />
	}<br />
<br />
	AfxEndThread(0);<br />

GeneralRe: WaitCommEvent() and new line Pin
Cedric Moonen12-Feb-08 21:49
Cedric Moonen12-Feb-08 21:49 
GeneralRe: WaitCommEvent() and new line Pin
rp_suman13-Feb-08 2:05
rp_suman13-Feb-08 2:05 
GeneralRe: WaitCommEvent() and new line Pin
rp_suman17-Feb-08 15:05
rp_suman17-Feb-08 15:05 
Generalpointer_default Pin
George_George12-Feb-08 20:58
George_George12-Feb-08 20:58 
GeneralRe: pointer_default Pin
David Crow13-Feb-08 3:12
David Crow13-Feb-08 3:12 
GeneralRe: pointer_default Pin
George_George13-Feb-08 3:47
George_George13-Feb-08 3:47 
GeneralRe: pointer_default Pin
David Crow13-Feb-08 3:57
David Crow13-Feb-08 3:57 
GeneralRe: pointer_default Pin
George_George13-Feb-08 16:47
George_George13-Feb-08 16:47 
GeneralRe: pointer_default Pin
David Crow14-Feb-08 4:51
David Crow14-Feb-08 4:51 
GeneralRe: pointer_default Pin
George_George14-Feb-08 18:21
George_George14-Feb-08 18:21 
Generalostrstream Pin
George_George12-Feb-08 20:38
George_George12-Feb-08 20:38 
GeneralRe: ostrstream Pin
CPallini12-Feb-08 22:08
mveCPallini12-Feb-08 22:08 
GeneralRe: ostrstream Pin
George_George12-Feb-08 22:31
George_George12-Feb-08 22:31 
GeneralRe: ostrstream Pin
CPallini12-Feb-08 22:41
mveCPallini12-Feb-08 22:41 
GeneralRe: ostrstream Pin
George_George12-Feb-08 22:48
George_George12-Feb-08 22:48 
GeneralRe: ostrstream Pin
CPallini12-Feb-08 22:56
mveCPallini12-Feb-08 22:56 
GeneralRe: ostrstream Pin
George_George12-Feb-08 23:23
George_George12-Feb-08 23:23 

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.