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

C / C++ / MFC

 
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 
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 
Just for everyone's reference, I figured out a way to do this (granted, this way isn't all that clean and is probably more of a 16-bit windows style of doing things, but it works). Rather than using WaitForSingleObject to wait for the I/O to complete, I stuck in this:

while (MsgWaitForMultipleObjects(1,
&ol.hEvent,
FALSE,
10,
QS_ALLINPUT) !=
WAIT_OBJECT_0) {
while ( PeekMessage ( &msg, NULL, 0, 0, PM_REMOVE)) {
DispatchMessage ( &msg);
}
}

So... I just keep dispatching all the messages I received until the serial even becomes signalled. This seems to work well.


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 
GeneralRe: CPtrList Pin
Navin9-Jul-04 5:10
Navin9-Jul-04 5:10 
GeneralRe: CPtrList Pin
Mahendra_7869-Jul-04 6:12
Mahendra_7869-Jul-04 6:12 

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.