c++ - MFC: How to catch set focus of each control of dialog in one function -


i have "n" dialogs have same base dialog. each dialog has own controls

  • edit boxes
  • combo boxes
  • list controls
  • etc.

in base dialog, how set focus messages of each control and,for example, give message box

text("hello got focus, id %d")? 

according this article, can hook wm_setfocus message.

you can control id using getdlgctrlid hwnd returned hook.

but beware of popping messagebox, change focus , trigger hook proc, making go loop!


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -