为什么弹出的菜单是灰色的?
假以辞色 2006-09-04 10:35:45 我在资源中增加了一个菜单如:IDR_MENU_TREE
里有有三个项,在属性中设置了Enabled 设置为 true
CPoint point;
GetCursorPos(&point);
CPoint pointTree = point;
ScreenToClient(&pointTree );
CMenu menu;
menu.LoadMenu(IDR_MENU_TREE);
CMenu* popup = menu.GetSubMenu(0);
ASSERT( popup != NULL );
popup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pointTree.x, pointTree.y, this, NULL);
菜单是弹出了,但为什么是灰色的