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

C / C++ / MFC

 
QuestionHelp with Standard Input Pin
Danzy8325-Aug-10 1:13
Danzy8325-Aug-10 1:13 
Is there any function in C++ or C that checks if there is a character in the standard input and returns immediately? I have this application that creates a new thread when it starts working on an assigned task. The new thread asks the user to press some keys for other options as the main thread does its work. What I want is that if the main thread finishes doing its work and the user has not selected any of the options, then the thread that was created to get user options should return. But because the new thread waits for user input, I'm finding it difficult to stop it from waiting for user input so that it can return. I initially thought cin.peek() could do it but it also waits when the user has not press any key. I want a way to terminate the new thread as it waits for input, when the main thread has finished its work. Please help.
AnswerRe: Help with Standard Input PinPopular
CPallini25-Aug-10 1:36
mveCPallini25-Aug-10 1:36 
AnswerRe: Help with Standard Input Pin
carter200025-Aug-10 3:05
carter200025-Aug-10 3:05 
GeneralRe: Help with Standard Input Pin
CPallini25-Aug-10 3:23
mveCPallini25-Aug-10 3:23 
QuestionHide TilteBar CMFCToolBar window Pin
Benjamin Bruno25-Aug-10 0:42
Benjamin Bruno25-Aug-10 0:42 
AnswerRe: Hide TilteBar CMFCToolBar window Pin
Sauro Viti25-Aug-10 1:15
professionalSauro Viti25-Aug-10 1:15 
QuestionSize of SDI window in MDI applcation Pin
Anu_Bala24-Aug-10 23:13
Anu_Bala24-Aug-10 23:13 
QuestionCString Pin
raju_shiva24-Aug-10 19:23
raju_shiva24-Aug-10 19:23 
AnswerRe: CString PinPopular
Niklas L24-Aug-10 19:43
Niklas L24-Aug-10 19:43 
AnswerRe: CString [modified] Pin
Shivanand Gupta24-Aug-10 20:38
Shivanand Gupta24-Aug-10 20:38 
GeneralRe: CString Pin
goorley24-Aug-10 22:34
goorley24-Aug-10 22:34 
GeneralRe: CString PinPopular
CPallini24-Aug-10 23:28
mveCPallini24-Aug-10 23:28 
AnswerRe: CString PinPopular
CPallini24-Aug-10 21:18
mveCPallini24-Aug-10 21:18 
GeneralRe: CString Pin
raju_shiva24-Aug-10 21:49
raju_shiva24-Aug-10 21:49 
GeneralRe: CString Pin
CPallini24-Aug-10 21:58
mveCPallini24-Aug-10 21:58 
GeneralRe: CString Pin
raju_shiva25-Aug-10 22:20
raju_shiva25-Aug-10 22:20 
GeneralRe: CString Pin
Shivanand Gupta25-Aug-10 8:55
Shivanand Gupta25-Aug-10 8:55 
QuestionUsing DeleteVolumeMountPoint function. Pin
dipuks24-Aug-10 11:53
dipuks24-Aug-10 11:53 
AnswerRe: Using DeleteVolumeMountPoint function. Pin
Peter_in_278024-Aug-10 13:22
professionalPeter_in_278024-Aug-10 13:22 
AnswerRe: Using DeleteVolumeMountPoint function. Pin
Sauro Viti24-Aug-10 21:11
professionalSauro Viti24-Aug-10 21:11 
GeneralRe: Using DeleteVolumeMountPoint function. Pin
dipuks25-Aug-10 2:45
dipuks25-Aug-10 2:45 
QuestionTrouble with VirtualAlloc Pin
garyflet24-Aug-10 8:30
garyflet24-Aug-10 8:30 
AnswerRe: Trouble with VirtualAlloc Pin
Luc Pattyn24-Aug-10 9:24
sitebuilderLuc Pattyn24-Aug-10 9:24 
GeneralRe: Trouble with VirtualAlloc Pin
garyflet24-Aug-10 10:08
garyflet24-Aug-10 10:08 
AnswerRe: Trouble with VirtualAlloc Pin
Luc Pattyn24-Aug-10 10:15
sitebuilderLuc Pattyn24-Aug-10 10: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.