Menu Item does not check

I am writing a dialog based app with a menu bar. There are some menu items that I would like them to be checked when they are selected. I used the message handler: UPDATE_COMMAND_UI with the code: "pCmdUI->SetCheck(1);". I put a message box inside this message handler, but the message box does not appear after I click the menu item. Any idea why and how to fix it?
  Thanks for the help.

michaelzhangAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
Using ON_UPDATE_COMMAND_UI with menu items and controls
http://www.codeguru.com/dialog/ccmduidialog.shtml

Using ON_UPDATE_COMMAND_UI with menu items and controls (2)
http://www.codeguru.com/dialog/OnUpdate.shtml
0
All Courses

From novice to tech pro — start learning today.