Re: Disabling / enabling entire menu and toolbar if child window open and has focus

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



That's not at all what I said. YOu would put an ON_UPDATE_COMMAND_UI handler in whatever
view wants to disable the menu items.
joe
On Fri, 11 Jul 2008 10:36:05 -0700 (PDT), ZagNut <simon.duvall@xxxxxxxxx> wrote:

On Jul 11, 1:24 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
You can't disable *all* the menu items typically, because you want File>Exit, Help>About,
other Help items, etc. enabled.  If you don't have a handler for a menu item, it is
typically disabled; if you want to override enablement, you would put a handler in your
HTML View class that disabled the menu items.  When a menu item is disabled, the
corresponding toolbar item is disabled.
                                joe

On Fri, 11 Jul 2008 09:41:07 -0700 (PDT), ZagNut <simon.duv...@xxxxxxxxx> wrote:
Greetings,

I have an MFC app within which a user can choose to go to the
company's web site.  If they select this from the menu, a CMDIChildWnd
is created containing a CHtmlView.  I need to have it so when this
window is opened, all the menus are disabled and the toolbar is
disabled.  Also, when the window loses / gets focus, the menus are
disabled / enabled respectively.

Is there an easy way of doing this?  How might I go about it?

Thanks for your help!

~simon

Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm

So i need to iterate through the menu items and disable / enable them?

~simon
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages