c++ - Prevent double click on MFC-Dialog button -


i'm developing autocad/bricscad-dialogs in mfc c++. know detected bigger problem. there dialog sets metadata 'special' drawing objects. update data of every 'special' drawing object dialog (in loop). if have ten 'special' drawing objects, same dialog open ten times (successively). have problem user make double click on "ok"-button. if double click fast enough, "ok"-button of next instance of dialog clicked automatically. tried lot (for example disabling button if clicked) nothing solved problem. maybe of have idea.

best regards, simon

when open new dialog can flush message queue of mouse click messages before going normal message loop, e.g.:

msg msg; while (peekmessage(&msg, hwnddlg, wm_lbuttondown, wm_lbuttondown, pm_remove)); 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -