On the right-click menu problem

Category: VC/MFC -> Foundation Classes Author: chengyingjie1001 Date: 2004-04-16 18:50:58
 
chengyingjie1001
2004-04-16 18:50:58
VC has a component to the program can be added to the context menu CWnd class , the last line of code is :
pPopup- > TrackPopupMenu (nFlags, x, y,   pWnd), which is ultimately to be treated pWnd this menu command window , also the owner of the pop-up menu .
I found a problem : If pWnd is CFrameWnd class is no problem ; but if it is a dialog class , then had trouble. Performance in dealing with the menu command , ON_UPDATE_COMMAND_UI corresponding OnUpdateXXX not work ! ! ! Under normal circumstances, the pop-up menu when the system should be run to the OnUpdate function, but now have to go in after clicking on the appropriate menu item , in fact, you can not play any role in the.

how to solve the problem , there is no expert opinion ?
yujiao525
2004-04-16 18:59:07
faq have similar postings
cn0919888
2004-04-16 19:01:10
OnContextMenu
zhuning1986
2004-04-16 19:15:42
Thank flyelf reply has been found in the faq in the post , though have not tried .