Author: Bob MastaBob Masta
Date: Feb 24, 2008 06:40
OK, I do know how to disable and enable top-level menus, using
EnableMenuItem. They really are disabled or enabled as I request.
The problem is in getting Windows to *show* them that way. What
happens is that there is no visible change until the mouse moves over
that item, then it is shown properly grayed or enabled.
I'm not sure, but this may be happening because I am changing
the menu enable states from a pop-up dialog, when the main window
doesn't have the focus, so all the top-level menu items appear gray
anyway at the time of the EnableMenuItem call.
So far, my only work-around is to toggle the Hilite state of the item
on and back off via back-to-back HiliteMenuItem calls every time I
use EnableMenuItem. Works fine, but seems pretty kludgey!
Anyone know the proper way to do this?
Many thanks!
Bob Masta
|