topMenu.EnableMenuItem( ID_MENU1, MF_GRAYED ); topMenu.EnableMenuItem( ID_MENU2, MF_GRAYED ); pPopupMenu->TrackPopupMenu(TPM_LEFTALIGN, point2.x, point2.y, this);