Hi, I have a menu command to which an accelerator is hooked. Whenever the command is disabled (using the ON_UPDATE_COMMAND_UI message) and I press the accelerator key, I get a trace message saying: "Warning: not executing disabled command". It comes from the CWnd::OnCommand method. The command is (correctly) not run, though.

I am just wondering if it is a normal behaviour that this message appears. Or did I forget something? I previously thought WM_COMMAND messages are not sent even from accelerators when the given command is disabled. This does not seem to me as an elegant solution - to send a message first and only then check if we really should process it.