Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGET BITMAP Pin
kedar.dave2-Feb-05 19:17
kedar.dave2-Feb-05 19:17 
QuestionHow to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages? Pin
ledallam2-Feb-05 17:59
ledallam2-Feb-05 17:59 
AnswerRe: How to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages? Pin
Christopher Lloyd3-Feb-05 1:23
Christopher Lloyd3-Feb-05 1:23 
GeneralRe: How to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages? Pin
Blake Miller3-Feb-05 6:03
Blake Miller3-Feb-05 6:03 
QuestionHow to corelate VC++ data to EXCElL sheet Pin
Member 9009872-Feb-05 17:56
Member 9009872-Feb-05 17:56 
AnswerRe: How to corelate VC++ data to EXCElL sheet Pin
tigron2-Feb-05 18:28
tigron2-Feb-05 18:28 
AnswerRe: How to corelate VC++ data to EXCElL sheet Pin
David Crow3-Feb-05 3:12
David Crow3-Feb-05 3:12 
GeneralThreaded Concept Question Pin
LighthouseJ2-Feb-05 16:53
LighthouseJ2-Feb-05 16:53 
Okay, I have my app but I need to now incorporate transmitting and receiving on the serial port. I can communicate via the serial port by hand (send statement then receive statement) but I want to thread-ify it. I'm thinking about at least threading the receiver at least, that way I can take an endless loop (or ends when the port is closed) and then simply listen for a character, store it and repeat. I think I can do that in a class derived from CWinThread. I need a FIFO-type buffer to store the characters that are read from the serial port from one end and transfer the data to my app, in a pipeline from the thread to my app.

First, what would be the best way to transfer data? All I can think of is deriving a class from CObject to hold the data, probably one byte at a time so it won't be waiting indefinitely for data that might not come and then use CObList and use the AddHead() and RemoveTail() to enforce the FIFO-style and the list will hold the data for me. I did this before because I needed to store run-length encoded bitmap information so I know how to do all of that.

Second, how do I pass something like that from my app to the thread class because the example I found uses AfxBeginThread to run the thread and there's no way to pass an argument, or none that I can see. Maybe create a function in my app that returns a pointer to the CObList. When the threads InitInstance runs, it can read the pointer, read the serial data and add that data to the list at the head?

Thanks in advance for your insight, Nathan.
GeneralRe: Threaded Concept Question Pin
LighthouseJ2-Feb-05 18:13
LighthouseJ2-Feb-05 18:13 
GeneralRe: Threaded Concept Question Pin
rwestgraham2-Feb-05 19:13
rwestgraham2-Feb-05 19:13 
GeneralRe: Threaded Concept Question Pin
LighthouseJ3-Feb-05 2:34
LighthouseJ3-Feb-05 2:34 
GeneralRe: Threaded Concept Question Pin
Blake Miller3-Feb-05 6:18
Blake Miller3-Feb-05 6:18 
GeneralDetecting fullscreen apps Pin
Anonymous2-Feb-05 16:51
Anonymous2-Feb-05 16:51 
GeneralTired of this problem Pin
pc_dev2-Feb-05 16:42
pc_dev2-Feb-05 16:42 
GeneralMFC help PLEASE!! Pin
messin182-Feb-05 14:19
messin182-Feb-05 14:19 
GeneralRe: MFC help PLEASE!! Pin
Bob Ciora2-Feb-05 14:31
Bob Ciora2-Feb-05 14:31 
GeneralRe: MFC help PLEASE!! Pin
messin182-Feb-05 18:10
messin182-Feb-05 18:10 
GeneralRe: MFC help PLEASE!! Pin
Bob Ciora3-Feb-05 1:53
Bob Ciora3-Feb-05 1:53 
General3D in a dialog... Pin
Bob Ciora3-Feb-05 3:33
Bob Ciora3-Feb-05 3:33 
GeneralRe: 3D in a dialog... Pin
Anonymous3-Feb-05 7:53
Anonymous3-Feb-05 7:53 
GeneralRe: 3D in a dialog... Pin
Bob Ciora3-Feb-05 11:31
Bob Ciora3-Feb-05 11:31 
GeneralRe: MFC help PLEASE!! Pin
Rick York3-Feb-05 7:28
mveRick York3-Feb-05 7:28 
GeneralRe: MFC help PLEASE!! Pin
Bob Ciora3-Feb-05 11:35
Bob Ciora3-Feb-05 11:35 
GeneralRe: MFC help PLEASE!! Pin
messin183-Feb-05 17:28
messin183-Feb-05 17:28 
GeneralRe: MFC help PLEASE!! Pin
Bob Ciora4-Feb-05 1:44
Bob Ciora4-Feb-05 1:44 

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.