Click here to Skip to main content
15,893,564 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DLL to VB callback help Pin
borono9-Apr-06 4:35
borono9-Apr-06 4:35 
GeneralRe: DLL to VB callback help Pin
Waldermort9-Apr-06 4:52
Waldermort9-Apr-06 4:52 
GeneralRe: DLL to VB callback help Pin
borono9-Apr-06 8:20
borono9-Apr-06 8:20 
QuestionThread is frozen Pin
LionAM8-Apr-06 12:51
LionAM8-Apr-06 12:51 
AnswerRe: Thread is frozen Pin
includeh108-Apr-06 19:07
includeh108-Apr-06 19:07 
AnswerRe: Thread is frozen Pin
Philipps8-Apr-06 20:13
Philipps8-Apr-06 20:13 
GeneralRe: Thread is frozen Pin
LionAM8-Apr-06 20:58
LionAM8-Apr-06 20:58 
QuestionTalking to a USB GPS device Pin
smikesmith8-Apr-06 12:23
smikesmith8-Apr-06 12:23 
I'm doing a hands-on learning process to communicate with a USB-GPS unit (specifically a Garmin GPS-18USB). I've searched a number of sources including Garmin's "SDK", and have figured out how to talk the language. I can manually get PVT info from the unit, etc., but would now like to move to the next step, that is, to make an MFC-based program "drive" the unit and display the data. The unit outputs data every second when instructed to do so.

I open the channel with CreateFile to produce a handle, and DeviceIoControl. I can send commands to the unit and receive data back. But I don't understand how to deal with asynchronous data and leave the GUI operating normally, that is, if I'm unsure when/if data may be received, I can't just call a Read or DeviceIoControl function: it will never return if there's no data available. I believe I need a worker thread to gather the data, but therein lies a problem:

How does one determine if data is available for a Read operation, read it, then get it back to the main app periodically for display? What's the right technique for managing this, knowing that perhaps the application may be asked to stop or close during a period that a Read operation is awaiting input? What functions may be used to allow a thread to be non-blocking, to respond to other messages?

AnswerRe: Talking to a USB GPS device Pin
Iain Clarke, Warrior Programmer8-Apr-06 12:54
Iain Clarke, Warrior Programmer8-Apr-06 12:54 
GeneralRe: Talking to a USB GPS device Pin
smikesmith8-Apr-06 13:00
smikesmith8-Apr-06 13:00 
GeneralRe: Talking to a USB GPS device Pin
Iain Clarke, Warrior Programmer8-Apr-06 13:07
Iain Clarke, Warrior Programmer8-Apr-06 13:07 
GeneralRe: Talking to a USB GPS device Pin
smikesmith8-Apr-06 13:15
smikesmith8-Apr-06 13:15 
QuestionQuestion about char* and __int32 Pin
big_denny_2008-Apr-06 11:43
big_denny_2008-Apr-06 11:43 
AnswerRe: Question about char* and __int32 Pin
Michael Dunn8-Apr-06 12:02
sitebuilderMichael Dunn8-Apr-06 12:02 
GeneralRe: Question about char* and __int32 Pin
big_denny_2008-Apr-06 23:23
big_denny_2008-Apr-06 23:23 
GeneralRe: Question about char* and __int32 Pin
Taka Muraoka9-Apr-06 3:36
Taka Muraoka9-Apr-06 3:36 
QuestionHow to paint from a memory DC to another memory DC Pin
Axonn Echysttas8-Apr-06 7:12
Axonn Echysttas8-Apr-06 7:12 
AnswerRe: How to paint from a memory DC to another memory DC Pin
includeh108-Apr-06 7:34
includeh108-Apr-06 7:34 
GeneralRe: How to paint from a memory DC to another memory DC Pin
Axonn Echysttas8-Apr-06 9:15
Axonn Echysttas8-Apr-06 9:15 
GeneralRe: How to paint from a memory DC to another memory DC Pin
includeh108-Apr-06 19:02
includeh108-Apr-06 19:02 
GeneralRe: How to paint from a memory DC to another memory DC Pin
Axonn Echysttas8-Apr-06 22:05
Axonn Echysttas8-Apr-06 22:05 
AnswerRe: How to paint from a memory DC to another memory DC Pin
Iain Clarke, Warrior Programmer8-Apr-06 12:59
Iain Clarke, Warrior Programmer8-Apr-06 12:59 
QuestionClient Area not repainted after restore from minimization (still not solved) Pin
naal118-Apr-06 6:44
naal118-Apr-06 6:44 
AnswerRe: Client Area not repainted after restore from minimization Pin
includeh108-Apr-06 7:08
includeh108-Apr-06 7:08 
GeneralRe: Client Area not repainted after restore from minimization Pin
naal118-Apr-06 7:15
naal118-Apr-06 7:15 

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.