popup menu disabled

CMenu Menu;
Menu.LoadMenu(IDR_MENU1);

CMenu * pSubMenu = Menu.GetSubMenu(0);

pSubMenu->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd());

I have the above ContextMenu message in a dialog. I have implemented the handler as well but it is still disabled. If I cange the last parameter in TrackPopup... to 'this' than it is enabled but ON_UPDATE_UI is not called properly. How do I make the option enabled and use the MFC's UPDATE_UI message as well?

thanks
[548 byte] By [retry] at [2007-11-18 22:13:00]
# 1 Re: popup menu disabled
check this dev-archive article
http://www.dev-archive.com/Cpp/W-D/dislog/commandui/article.php/c1919/
kirants at 2007-11-11 1:04:40 >