Click here to Skip to main content
15,913,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCPropertySheet / Page question Pin
hongheo769-Jul-04 9:21
hongheo769-Jul-04 9:21 
GeneralRe: CPropertySheet / Page question Pin
PJ Arends10-Jul-04 9:45
professionalPJ Arends10-Jul-04 9:45 
GeneralNon-Blocking I/O From Within a Dialog Pin
pHaze4269-Jul-04 8:31
pHaze4269-Jul-04 8:31 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
David Crow9-Jul-04 8:40
David Crow9-Jul-04 8:40 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
pHaze4269-Jul-04 9:06
pHaze4269-Jul-04 9:06 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
David Crow9-Jul-04 9:12
David Crow9-Jul-04 9:12 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
palbano9-Jul-04 8:46
palbano9-Jul-04 8:46 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
pHaze4269-Jul-04 9:30
pHaze4269-Jul-04 9:30 
I guess I am using threads in a roundabout sort of way. When I call CreateFile to open the serial port, I specify the OVERLAPPED I/O flag. Then, when I call ReadFile() I pass it an overlapped structure with an event handle. When it's done, it sets that event handle. (I guess this means that internally, Windows is spawning another thread for ReadFile). Anyhow. WaitForSingleObject just waits until the event handle is set, or its own timeout has expired. So... if I give the call to ReadFile a timeout of 10 seconds and the call to WaitForSingleObject a timeout of 100ms, I will get a chance to do something every 100ms until the serial I/O completes, or readfile times out after 10s.

Along the SendMessage lines, I've used:
this->SendMessage(WM_PAINT, 0, 0); from within this wait loop to no avail. Is there another message I should be sending?
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
palbano10-Jul-04 8:17
palbano10-Jul-04 8:17 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
pHaze42612-Jul-04 2:30
pHaze42612-Jul-04 2:30 
GeneralA pointer delimma (requesting help from pointer/dynamic array gurus) Pin
NTense9-Jul-04 7:45
NTense9-Jul-04 7:45 
GeneralRe: A pointer delimma (requesting help from pointer/dynamic array gurus) Pin
palbano9-Jul-04 8:13
palbano9-Jul-04 8:13 
GeneralRe: A pointer delimma (requesting help from pointer/dynamic array gurus) Pin
NTense10-Jul-04 7:22
NTense10-Jul-04 7:22 
GeneralTesting which OS I'm on Pin
Timothy Grabrian9-Jul-04 6:15
professionalTimothy Grabrian9-Jul-04 6:15 
GeneralRe: Testing which OS I'm on Pin
David Crow9-Jul-04 7:01
David Crow9-Jul-04 7:01 
GeneralRe: Testing which OS I'm on Pin
palbano9-Jul-04 7:04
palbano9-Jul-04 7:04 
GeneralRe: Testing which OS I'm on Pin
jmkhael9-Jul-04 7:05
jmkhael9-Jul-04 7:05 
GeneralRe: Testing which OS I'm on Pin
Michael Dunn9-Jul-04 10:05
sitebuilderMichael Dunn9-Jul-04 10:05 
GeneralRe: Testing which OS I'm on Pin
ThatsAlok9-Jul-04 19:25
ThatsAlok9-Jul-04 19:25 
Generaladding help to application Pin
BlackDice9-Jul-04 6:10
BlackDice9-Jul-04 6:10 
GeneralRe: adding help to application Pin
David Crow9-Jul-04 7:03
David Crow9-Jul-04 7:03 
GeneralRe: adding help to application Pin
BlackDice9-Jul-04 7:11
BlackDice9-Jul-04 7:11 
Generalfullscreening a dialog Pin
locoone9-Jul-04 4:47
locoone9-Jul-04 4:47 
GeneralRe: fullscreening a dialog Pin
Timothy Grabrian9-Jul-04 6:02
professionalTimothy Grabrian9-Jul-04 6:02 
GeneralCPtrList Pin
Mahendra_7869-Jul-04 4:46
Mahendra_7869-Jul-04 4:46 

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.