I am working on a project using Visual C ++ 6.0, and I need to be able to enable or disable certain menu items depending on the permissions assigned to the current user. This is the code I'm using:
He is doing exactly what I want to do, but I am trying to find a better place to create it. If I put it in OnInitialUpdate()
, I get the results that I want, but only for opening the first account. If you open a second invoice without closing and reopening the dialog, the code will not be executed again. OnUpdate()
not called when another invoice is opened, and the only other place I found is OnDraw()
working, the problem with OnDraw()
is that the menu item does not visually change the state from displayed to gray. Enabled or vice versa, until you try to click it.
source share