c++ - Pass through accelerator key while modeless dialog window up -


we have large in-house mfc app. has main window menubar, , hundreds of unique subwindows (without menubars) display on top of main window (not simultaneously). these subwindows implemented cdialogs run modelessly (via createwindow, not domodal). parent hwnd set null.

we got feature request--allow particular menubar accelerator main window work, when 1 of subwindows active window. make sense user perspective.

this faked pretty application-wide keyboard hook, watching exact keystroke, wondering if there cleaner way?

you can use registerhotkey() in main window. have side effect new hotkey trigger if pressed in different application. can work around comparing getcurrentprocessid() getwindowthreadprocessid(getforegroundwindow())


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -