0
표시되기 전에 수정하고 싶은 팝업 메뉴가 있습니다. 실제로 메뉴 항목의 문자열을 잘 수정할 수 있습니다. 문제는 수정 된 메뉴 항목을 클릭 할 때 아무 일도 일어나지 않아 쓸모 없게 만듭니다.메뉴 항목 수정하기
CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
CWnd* pWndPopupOwner = this;
while(pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
// modify string
pPopup->ModifyMenu(1, MF_BYPOSITION | MF_STRING, NULL, oss.str().c_str());
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, pWndPopupOwner);
훌륭해. 고마워. – mnoergaard