I have added a menu to a CDialog based app. Now I want to use the UPDATE_COMMAND_UI to enable/disable menu items. I have put the COMMAND handler in the Main dialog class, and I tried to do the same with UPDATE_COMMAND_UI. Don't work, the handler function doesn't get called. How can I enable/disable menu items?