Click here to Skip to main content
15,906,567 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Windows Menus and the WM_MENUCOMMAND message Pin
Martin081516-Feb-07 3:56
professionalMartin081516-Feb-07 3:56 
AnswerRe: Windows Menus and the WM_MENUCOMMAND message Pin
prasad_som16-Feb-07 5:00
prasad_som16-Feb-07 5:00 
GeneralRe: Windows Menus and the WM_MENUCOMMAND message Pin
Martin081516-Feb-07 6:31
professionalMartin081516-Feb-07 6:31 
QuestionDebugging capability Pin
mt_samiei15-Feb-07 22:39
mt_samiei15-Feb-07 22:39 
AnswerRe: Debugging capability Pin
Cedric Moonen15-Feb-07 22:50
Cedric Moonen15-Feb-07 22:50 
GeneralRe: Debugging capability Pin
mt_samiei15-Feb-07 23:03
mt_samiei15-Feb-07 23:03 
GeneralRe: Debugging capability Pin
NiceNaidu15-Feb-07 23:07
NiceNaidu15-Feb-07 23:07 
Questionkbhit() Question Pin
Programm3r15-Feb-07 20:57
Programm3r15-Feb-07 20:57 
Hi all,

I have the following problem. I using a while loop, and if the user hits any key I prompt the user whether he/she wants to exit (Thats working ... awaiting previous thread). The problem comes in when the users selects No, when every loop cycle it asks the same question over and over again. How can I clear the buffer of the key board hit funtion ??

while(1)
{
    if(kbhit())
    {
        UINT msg_rc;
        msg_rc = MessageBox(NULL,"Are you sure you want to close the TCP/IP Server","Confirmation",MB_YESNOCANCEL);
        if (msg_rc == IDYES)
        {
           exit(1); // NEW....
           break;
        }
    }
....


Many thanx
Regards,


The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

AnswerRe: kbhit() Question Pin
Programm3r15-Feb-07 21:10
Programm3r15-Feb-07 21:10 
GeneralRe: kbhit() Question Pin
prasad_som15-Feb-07 22:29
prasad_som15-Feb-07 22:29 
AnswerRe: kbhit() Question [modified] Pin
prasad_som15-Feb-07 21:54
prasad_som15-Feb-07 21:54 
AnswerRe: kbhit() Question Pin
David Crow16-Feb-07 3:19
David Crow16-Feb-07 3:19 
QuestionMessagebox Question Pin
Programm3r15-Feb-07 20:47
Programm3r15-Feb-07 20:47 
AnswerRe: Messagebox Question Pin
toxcct15-Feb-07 20:52
toxcct15-Feb-07 20:52 
GeneralRe: Messagebox Question Pin
Programm3r15-Feb-07 20:57
Programm3r15-Feb-07 20:57 
QuestionENTER and SHIFT+ENTER in simple text edit box (EDITTEXT) Pin
deivakumar15-Feb-07 20:10
deivakumar15-Feb-07 20:10 
QuestionRe: ENTER and SHIFT+ENTER in simple text edit box (EDITTEXT) Pin
kakan15-Feb-07 20:30
professionalkakan15-Feb-07 20:30 
AnswerRe: ENTER and SHIFT+ENTER in simple text edit box (EDITTEXT) Pin
Michael Dunn15-Feb-07 20:43
sitebuilderMichael Dunn15-Feb-07 20:43 
QuestionQuick repaints Pin
BishGada15-Feb-07 19:42
BishGada15-Feb-07 19:42 
QuestionRe: Quick repaints Pin
prasad_som15-Feb-07 19:53
prasad_som15-Feb-07 19:53 
QuestionUnable to create Service using Network Service Account Pin
AbbyIndian15-Feb-07 19:03
AbbyIndian15-Feb-07 19:03 
AnswerRe: Unable to create Service using Network Service Account Pin
Mark Salsbery16-Feb-07 7:02
Mark Salsbery16-Feb-07 7:02 
GeneralRe: Unable to create Service using Network Service Account Pin
AbbyIndian16-Feb-07 7:40
AbbyIndian16-Feb-07 7:40 
GeneralRe: Unable to create Service using Network Service Account Pin
Mark Salsbery16-Feb-07 8:06
Mark Salsbery16-Feb-07 8:06 
GeneralRe: Unable to create Service using Network Service Account Pin
AbbyIndian16-Feb-07 8:24
AbbyIndian16-Feb-07 8:24 

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.