Good day,
is there any way to keep focus on a floating tool window when the main Window's menu is clicked/activated ?
Thanks and best regards
Marc
Good day,
is there any way to keep focus on a floating tool window when the main Window's menu is clicked/activated ?
Thanks and best regards
Marc
Hi Marc,
That would need to be done by the control you are clicking. Our Bars product does handle this for you if you are using it. But if you are using another menu, then that menu's creator would need to prevent clicks from activating the window.
I believe we handle it in Bars by handling the WM_MOUSEACTIVATE API message and returning MA_NOACTIVATE.
Hi,
but it happens also if I use the Actipro Main Menu, like in your demo.
Any idea ?
Thanks and best regards
Marc
Hi Marc,
The Docking demo uses a normal WinForms menu so the issue will show up there. Our Bars demo on the other hand uses Docking as well and shows how it does not happen there.
Hi,
the same problem applies when the user switches the application. If the focus is in a docked or MDI window, the window keeps the focus. But the floating window loses its focus and instead another window of the application is focused.
Do you have a workaround for that issue?
Hi Tobias,
I'm not sure what can be done in that particular scenario. I believe Windows is activating the main window in that scenario so whatever control last had focus in that window is what gets focus again. The only possible thing I can think of is that you somehow handle the app's WM_ACTIVATEAPP message and then act to restore focus somehow based on that. But the problem is that I'm not sure how you can tell if the app is being activated from ways such Alt+Tab or by mouse focus.
Please log in to a validated account to post comments.