Discussion:
SDI, added menu items are grayed
(too old to reply)
In Excelsius Dago
2007-10-11 15:55:17 UTC
Permalink
I created an SDI. It came with its own menu, which I wanted to adjust.
I went into the resource pane and the only menu resource was
IDR_MAINFRAME. In there, any item that I add is grayed out when I run
the application. How does one un-gray these items? thanks in advance.
David Lowndes
2007-10-11 18:35:09 UTC
Permalink
Post by In Excelsius Dago
I created an SDI. It came with its own menu, which I wanted to adjust.
I went into the resource pane and the only menu resource was
IDR_MAINFRAME. In there, any item that I add is grayed out when I run
the application. How does one un-gray these items? thanks in advance.
Once you add a handler for the menu item, it'll be enabled.

Dave
Tom Serface
2007-10-11 22:51:18 UTC
Permalink
To add to David's comment, you can also add COMMAND_UI handlers to dim items
based on some condition in your program. Like David said, MFC dims them
automatically if there is no message handler.

Tom
Post by In Excelsius Dago
I created an SDI. It came with its own menu, which I wanted to adjust.
I went into the resource pane and the only menu resource was
IDR_MAINFRAME. In there, any item that I add is grayed out when I run
the application. How does one un-gray these items? thanks in advance.
Loading...