Getting call to UPDATE_COMMAND_UI in case of toolbar


I have a dialog in MFC application, which was having menu-bar. Now I have created a toolbar in that dialog using the same command which was in the menu-bar.

I use to update the menu-item's state and makes it enable/disable as per some check, When I clicks on the menu. But for toolbar I didn't gets these calls to update it's state, If it should be enabled/disabled.

Moreover I didn't have any notification when the test fails and I to disable the item.

Is there some alternative for doing this?
call to ON_UPDATE_COMMAND_UI is only coming when I click on the toolbar button.

Topic archived. No new replies allowed.