Click here to Skip to main content
15,884,986 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: find pixel colour on screen Pin
Divyang Mithaiwala19-Feb-06 17:26
Divyang Mithaiwala19-Feb-06 17:26 
AnswerRe: find pixel colour on screen Pin
Gavin Taylor19-Feb-06 2:19
professionalGavin Taylor19-Feb-06 2:19 
AnswerRe: find pixel colour on screen Pin
OnTilt19-Feb-06 9:47
OnTilt19-Feb-06 9:47 
AnswerRe: find pixel colour on screen Pin
Owner drawn19-Feb-06 18:15
Owner drawn19-Feb-06 18:15 
QuestionTrapping Interrupts in Windows Pin
Rane18-Feb-06 17:40
Rane18-Feb-06 17:40 
AnswerRe: Trapping Interrupts in Windows Pin
Gary R. Wheeler19-Feb-06 4:11
Gary R. Wheeler19-Feb-06 4:11 
GeneralRe: Trapping Interrupts in Windows Pin
Rane19-Feb-06 18:50
Rane19-Feb-06 18:50 
QuestionSimple Win32 Console App question... Pin
jc0dex18-Feb-06 15:36
jc0dex18-Feb-06 15:36 
Hey Guys ..

I'm running a Win32 Console UDP Server/Client application. I want to run my server update function inside my main loop while also checking for key input. All I need to check for is if a single key has been pressed.

The kicker is I need a way to continue on with the update without pausing for user input. When the user hits 't' for toggle it calls a function that closes the socket and reopens it as a server or client.

Here's what I have now, but as I said I need something that doesn't wait for user input.

Update()
{
char toggle;

toggle = cin.get()

if(toggle == 't')
{
ToggleMode();
}

// get all the packets we can
while(ReceiveData());

// Send all the data to the clients
SendData();

return true;
}

Thanks in advance!

AnswerRe: Simple Win32 Console App question... Pin
PJ Arends18-Feb-06 16:58
professionalPJ Arends18-Feb-06 16:58 
GeneralRe: Simple Win32 Console App question... Pin
jc0dex18-Feb-06 17:27
jc0dex18-Feb-06 17:27 
GeneralRe: Simple Win32 Console App question... Pin
PJ Arends18-Feb-06 17:32
professionalPJ Arends18-Feb-06 17:32 
AnswerRe: Simple Win32 Console App question... Pin
jc0dex18-Feb-06 17:57
jc0dex18-Feb-06 17:57 
QuestionHow to use CreateProcessAsUser?! Pin
PPatrickFFM18-Feb-06 13:20
PPatrickFFM18-Feb-06 13:20 
AnswerRe: How to use CreateProcessAsUser?! Pin
oshah18-Feb-06 13:40
oshah18-Feb-06 13:40 
Questionrich edit box Pin
Sam 200618-Feb-06 13:11
Sam 200618-Feb-06 13:11 
AnswerRe: rich edit box Pin
Michael Dunn18-Feb-06 13:21
sitebuilderMichael Dunn18-Feb-06 13:21 
GeneralRe: rich edit box Pin
Sam 200618-Feb-06 14:10
Sam 200618-Feb-06 14:10 
GeneralRe: rich edit box Pin
Sam 200618-Feb-06 16:25
Sam 200618-Feb-06 16:25 
QuestionPrinting Combinations Pin
RockyJames18-Feb-06 9:50
RockyJames18-Feb-06 9:50 
AnswerRe: Printing Combinations Pin
Michael Dunn18-Feb-06 11:16
sitebuilderMichael Dunn18-Feb-06 11:16 
AnswerRe: Printing Combinations Pin
Gary R. Wheeler18-Feb-06 11:16
Gary R. Wheeler18-Feb-06 11:16 
QuestionCreating a directory and copying files Pin
theprinc18-Feb-06 8:13
theprinc18-Feb-06 8:13 
AnswerRe: Creating a directory and copying files Pin
Michael Dunn18-Feb-06 9:39
sitebuilderMichael Dunn18-Feb-06 9:39 
QuestionSetWindowTheme - How does it work? Pin
peburkle18-Feb-06 8:03
peburkle18-Feb-06 8:03 
AnswerRe: SetWindowTheme - How does it work? Pin
Michael Dunn18-Feb-06 9:41
sitebuilderMichael Dunn18-Feb-06 9:41 

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.