CMenu menu;
ClientToScreen(&point);
VERIFY( menu.LoadMenu( IDR_MENU1 ) );
CMenu* popup = menu.GetSubMenu(0);
ASSERT( popup != NULL );
popup->EnableMenuItem(ID_POPUP1, MF_BYCOMMAND|MF_GRAYED);
popup->ModifyMenu(ID_POPUP1,MF_BYCOMMAND,ID_POPUP1, "11");
popup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this );
本文地址:http://com.8s8s.com/it/it457.htm