Link to home
Start Free TrialLog in
Avatar of britney
britney

asked on

not to disable undo menu

In CEditView, if  I select some text and cut it, my Undo menu gets disabled. Also my toolbar button to handle Undo command gets greyed. I want to control the enable/disable of these by myself. How can I do it?
ASKER CERTIFIED SOLUTION
Avatar of mblat
mblat

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of britney
britney

ASKER

hi mblat,
I set m_bAutoMenuEnable  = FALSE; in constructor of my CMainFrame. It still disables the menu and toolbar button on using Cut. It's ok for  me if they never get disabled. Comment with m_bAutoMenuEnable in AFXWIN.H says:

BOOL m_bAutoMenuEnable;
          // TRUE => menu items without handlers will be disabled

I think this is for automatic enabling/disabling of menu items with/without handlers. What I need is the  menu item never gets automatically disabled.



// TRUE => menu items without handlers will be disabled

so, did you define handler?  try to define it and then try to define UPDATE_COMMAND_UI handler.