load commands using WM_COPYDATA: XY was brouight to foreground and the menu was opened. I didn't want XY in foreground and after incorrectly assuming it was an XY issue, I found that my code was the culprit (I had missed an optional flag that was set to its default and did that).Now that this is done I have another problem: the selected accelerators for the menuitems don't work! When I open the menu, the focus stays on the active app and pressing keys will send them there instead of the menu. However, since the
popupmenu command creates the menu, I don't think I have an option to handle focus before the call. But I imagine that must be a general problem for anyone using WM_COPYDATA to open menus. (Right?)So is there a hack to deal with that or does it that only work with XY in foreground?
Just to avoid misunderstandings: here is an example of such a menu where the key
0 can be used to select the Shutdown option.
XYplorer Beta Club