windows - C++/(MFC dummy) and pure Win MessageBox() - How to delete message queue or other way to delete existing mouse clicks / key buffer -
(maybe beginner question people experienced windows message queue handling , dialg boxes. unfortunately not my area of expertise, please gracious me.)
i have quite simple c++ program in terms of user interface. should not real console program of several reasons, runs unattended. mfc stub without showing window @ all. shows message boxes :
messagebox("question,"xx",mb_yesno) or so.
the problem is, that, when 2 questions posed after each other, windows seems save mouse click or keyboard click or user wanted klick once, hardware send 2 clicks. user has not real possibility answer second question, yes or no answered "ghost" click before. (there word it, don't know in english. hope, got point though.)
in command line there fflush() such things. how handle here?
i use customized messagebox, if find somewhere ready code (and have not write :-)
but thought, there might easy-to-use snippet delete message queue of app before next messagebox shown. know windows messages exist ;-( can me?
philm,
message box modal window, hence has own message loop. when message box dismissed, message not exist, no mouse messages.
mouse click messages posted window under cursor, unless getcapture called. claim, not show window, no mouse messages posted in que?
the way resolve problem debug application or test project write duplicate problem. can write , post somewhere downloading?
Comments
Post a Comment