Click here to Skip to main content
15,905,614 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMessage Removed Pin
19-Sep-07 12:01
Armond Sarkisian19-Sep-07 12:01 
AnswerRe: Checking for downloadable link Pin
Mark Salsbery19-Sep-07 12:13
Mark Salsbery19-Sep-07 12:13 
GeneralMessage Removed Pin
19-Sep-07 12:16
Armond Sarkisian19-Sep-07 12:16 
GeneralRe: Checking for downloadable link Pin
ThatsAlok19-Sep-07 20:36
ThatsAlok19-Sep-07 20:36 
QuestionGPS Open just right after Close=> Error Pin
shpid3r19-Sep-07 11:04
shpid3r19-Sep-07 11:04 
AnswerRe: GPS Open just right after Close=> Error Pin
Nathan Holt at EMOM19-Sep-07 11:34
Nathan Holt at EMOM19-Sep-07 11:34 
AnswerRe: GPS Open just right after Close=> Error Pin
shpid3r19-Sep-07 15:00
shpid3r19-Sep-07 15:00 
GeneralRe: GPS Open just right after Close=> Error Pin
Nathan Holt at EMOM19-Sep-07 15:12
Nathan Holt at EMOM19-Sep-07 15:12 
shpid3r wrote:
-you cannot determine when the gps is turning off. That Is, the function that closes the GPS Device doesn`t return a Handle (to use WaitForSingleObject) but a DWORD. Therefore, once you have commanded it to close, it's going to close in a certain time. Your flags all set accordingly to GPS Off, though 5 seconds it's on Turning_OFF mode, so to say.


You mentioned a background thread, which is a good idea for this sort of problem. You gave me the impression that the background thread terminates when the GPS is closed, which would allow you to just wait for the thread to terminate. Your approach of setting a flag should work regardless.


shpid3r wrote:
- I do refresh my screen once every 100 ms (I've set a timer which I use for audio buffering, as well). I didn`t quite understand what you`re suggesting me to do here... Please expand


The idea is that instead of pressing "Off" and having the program hang for 5 seconds, the "Off" button could begin the operation in the background, and while it is happenning, there will be a message on the dialog indicating that the GPS is turning off, and both the "On" and the "Off" buttons will be disabled for the time. Then, when your refresh detects that the GPS is fully off, it can change the message and enable the "On" button. Throughout the whole process, the user could continue to use any features that don't depend on the GPS.

Nathan
GeneralRe: GPS Open just right after Close=> Error Pin
shpid3r19-Sep-07 15:29
shpid3r19-Sep-07 15:29 
GeneralRe: GPS Open just right after Close=> Error Pin
Nathan Holt at EMOM19-Sep-07 15:37
Nathan Holt at EMOM19-Sep-07 15:37 
Questionhow to get a memory address into a CString Pin
USAFHokie8019-Sep-07 10:46
USAFHokie8019-Sep-07 10:46 
QuestionRe: how to get a memory address into a CString Pin
David Crow19-Sep-07 10:58
David Crow19-Sep-07 10:58 
AnswerRe: how to get a memory address into a CString Pin
USAFHokie8019-Sep-07 11:06
USAFHokie8019-Sep-07 11:06 
QuestionRe: how to get a memory address into a CString Pin
David Crow20-Sep-07 2:39
David Crow20-Sep-07 2:39 
AnswerRe: how to get a memory address into a CString Pin
Nathan Holt at EMOM19-Sep-07 11:40
Nathan Holt at EMOM19-Sep-07 11:40 
AnswerRe: how to get a memory address into a CString Pin
Mark Salsbery19-Sep-07 11:43
Mark Salsbery19-Sep-07 11:43 
AnswerRe: how to get a memory address into a CString Pin
ThatsAlok19-Sep-07 20:37
ThatsAlok19-Sep-07 20:37 
Questioncheck file status Pin
panrunling19-Sep-07 10:41
panrunling19-Sep-07 10:41 
AnswerRe: check file status Pin
David Crow19-Sep-07 10:56
David Crow19-Sep-07 10:56 
GeneralRe: check file status Pin
panrunling19-Sep-07 11:05
panrunling19-Sep-07 11:05 
QuestionRe: check file status Pin
David Crow19-Sep-07 18:12
David Crow19-Sep-07 18:12 
Question"filename.chm not a windows help file, or the file is corrupted" Pin
tingu19-Sep-07 9:09
tingu19-Sep-07 9:09 
QuestionFast serialization Pin
Budric B.19-Sep-07 9:07
Budric B.19-Sep-07 9:07 
AnswerRe: Fast serialization Pin
El Corazon19-Sep-07 10:10
El Corazon19-Sep-07 10:10 
QuestionRe: Fast serialization Pin
David Crow19-Sep-07 10:34
David Crow19-Sep-07 10:34 

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.