Quote: Associated with each menu item is a unique, application-defined integer, called a menu-item identifier. When the user chooses a command item from a menu, the system sends the item's identifier to the owner window as part of a WM_COMMAND message. The window procedure examines the identifier to determine the source of the message, and processes the message accordingly. In addition, you can specify a menu item using its identifier when you call menu functions; for example, to enable or disable a menu item.
This is your problem right? You can't get the message that the item sends when pressed by the user. I tried receiving this for days, but I didn't succeed what of course doesn't mean that it's impossible. My advice: Create the menu on your own using panels and buttons. You can use the API for showing the menudialogs like open save and close, but I don't recommend you using the windows menustructure itself.