Void CXXXView: : OnEditCut ()
{
//code
}
Void CXXXView: : OnUpdateEditCut (CCmdUI * pCmdUI)
{
If (satisfy conditions)
{
PCmdUI - & gt; The Enable (FALSE);
}
}
Now want to OnContextMenu right-click popup menu in the view, "shear" menu and the toolbar ICONS on the grey, study a day, don't know how to deal with,
The original idea: in the view pop-up menu Settings before to meet the conditions, SendMessage (this - & gt; M_hWnd, WM_COMMAND MAKEWPARAM (ID_EDIT_CUT, 0), 0), the code is a pop-up menu, tried it doesn't work,
Just graduated, in the study of MFC, a few years time, forget about, beg you MFC expert help, give a way of thinking,
CodePudding user response:
In OnInitMenuPopup (CMenu * pPopupMenu, UINT nIndex, BOOL bSysMenu) in processingCodePudding user response:
CEditView GetSelectedText judge selected strings, not empty when enabledCodePudding user response: