Click here to Skip to main content
16,006,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: scroll using middle button Pin
lucy4-Nov-02 9:39
lucy4-Nov-02 9:39 
Questionhow to make one function dual duty? Pin
ns4-Nov-02 8:04
ns4-Nov-02 8:04 
AnswerRe: how to make one function dual duty? Pin
Anonymous4-Nov-02 8:06
Anonymous4-Nov-02 8:06 
GeneralRe: how to make one function dual duty? Pin
ns4-Nov-02 8:14
ns4-Nov-02 8:14 
GeneralRe: how to make one function dual duty? Pin
ns4-Nov-02 8:26
ns4-Nov-02 8:26 
GeneralRe: how to make one function dual duty? Pin
Anonymous4-Nov-02 8:31
Anonymous4-Nov-02 8:31 
GeneralRe: how to make one function dual duty? Pin
ns4-Nov-02 8:38
ns4-Nov-02 8:38 
GeneralC++ serial communication Pin
Ayush4-Nov-02 7:59
Ayush4-Nov-02 7:59 
I've been referring to the article here on win32 serial comms. Im building a link to perform just one character(1 byte) transmission/reception via the serial port. I managed to get the send(WriteFile) working, but the receiver just doesnt seem to work, nor does it give an error. This is the code im using for the receive character function.

void CBuggyControllerDlg::OnRec() <br />
{<br />
<br />
	UpdateData(TRUE);<br />
	if((ReadFile(handlePort_,&recd,1,&length,NULL))==0)<br />
	{AfxMessageBox("No Data on Input Serial Buffer");}<br />
	else{<br />
		m_strlistupdate=recd;<br />
		m_list.InsertString (0, _T(m_strlistupdate));}<br />
	<br />
}


The function is called only after a byte has been sent and hence no monitoring of the port is necessary, although i imagine a loop would be needed. When i send a byte to this programs serial port, and then click recieve{OnRec()}, it doesnt give an error, nor does it display the right character. Could somebody please help me? I have set all the dcb config, including the one for flow control. Send Data works perfectly.
GeneralRe: C++ serial communication Pin
Ayush4-Nov-02 8:22
Ayush4-Nov-02 8:22 
GeneralContext Menu from the Status Bar.. Pin
Anonymous4-Nov-02 7:40
Anonymous4-Nov-02 7:40 
GeneralRe: Context Menu from the Status Bar.. Pin
Ravi Bhavnani4-Nov-02 7:45
professionalRavi Bhavnani4-Nov-02 7:45 
GeneralRe: Context Menu from the Status Bar.. Pin
Anonymous4-Nov-02 7:52
Anonymous4-Nov-02 7:52 
GeneralColored Grid Pin
fossilman4-Nov-02 7:15
fossilman4-Nov-02 7:15 
GeneralRe: Colored Grid Pin
Bill Wilson4-Nov-02 13:50
Bill Wilson4-Nov-02 13:50 
GeneralCHtmlView with Flash not repainting... Pin
Happy_Dog4-Nov-02 7:15
Happy_Dog4-Nov-02 7:15 
GeneralAsk about function parameters and pass a reference. Pin
ooosawaddee34-Nov-02 7:02
ooosawaddee34-Nov-02 7:02 
GeneralRe: Ask about function parameters and pass a reference. Pin
ian mariano4-Nov-02 7:17
ian mariano4-Nov-02 7:17 
GeneralSaving int's, floats, BYTEs to file Pin
Kuniva4-Nov-02 6:46
Kuniva4-Nov-02 6:46 
GeneralRe: Saving int's, floats, BYTEs to file Pin
Ravi Bhavnani4-Nov-02 7:25
professionalRavi Bhavnani4-Nov-02 7:25 
GeneralRe: Saving int's, floats, BYTEs to file Pin
Kuniva4-Nov-02 7:44
Kuniva4-Nov-02 7:44 
GeneralRe: Saving int's, floats, BYTEs to file Pin
Carlos Antollini4-Nov-02 7:41
Carlos Antollini4-Nov-02 7:41 
GeneralRe: Saving int's, floats, BYTEs to file Pin
Christian Graus4-Nov-02 9:57
protectorChristian Graus4-Nov-02 9:57 
Questionhow can I debug this? Pin
ns4-Nov-02 6:40
ns4-Nov-02 6:40 
AnswerRe: how can I debug this? Pin
Andreas Saurwein4-Nov-02 6:41
Andreas Saurwein4-Nov-02 6:41 
GeneralRe: how can I debug this? Pin
ns4-Nov-02 7:55
ns4-Nov-02 7:55 

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.