My problem is that I have code I cannot modify that reacts to ON_UPDATE_COMMAND_UI, and I’ve hosted the code in WinForms, so it’s not routing the messages correctly.
I’ve hooked into the Idle override in my winform host, but I don’t know how to mimic the message.
If I wanted to mimic ON_UPDATE_COMMAND_UI by sending a message directly to a target, how would I arrange WPARAM and LPARAM.
I’ve looked at the guts of MFC, and it appears that it doesn’t send a message at all really, it goes straight from routing commands through methods in CmdTarget to manually searching through a target’s message map.
So, since I have no examples of pushing a real message, I don’t know how to do it.
Alternate solutions equally accepted!
That statement is incorrect. Al routing starts with the WM_IDLEUPDATECMDUI message sent to the main window and all descendants when application enters idle state.
It is also sent when menu pops up to update menu items.
I do not think that implementing it in .NET world will be easy.