none
Add a menu item RRS feed

  • Question

  • Hello everyone

    I have inherited a Windows applicaiton that I now need to add a menu item to. I am uising VS 2008 C++

    So I edit the menu via the Resource pane, click Insert New and type the text for the menu.

    However, when I run the applicaiton my menu item is shown as being disabled

    What have I done wrong?

     

    TIA

     

    Graham

    • Moved by Cindy Meister MVP Sunday, October 24, 2010 10:34 AM not VSTO-related (From:Visual Studio Tools for Office)
    Friday, October 22, 2010 8:02 AM

Answers

  • hmmm ... sounds like a MFC application and not a windows forms.

    In windows forms the menu item should be unaffected (enabled/disabled) from the settings in the forms editor if you do not something otherwise in your programm.

    If it is a MFC application then the menu item is disabled by the framework if there's no message handler assigned to handle the menu command. In that case you better ask next time in this forum: Visual C++ MFC and ATL
    • Marked as answer by Jing0Moderator Friday, November 5, 2010 10:02 AM
    Wednesday, October 27, 2010 5:15 AM

All replies

  • Hello mrxxbean,

    How and What do you mean by "ingerited a Windows application"? Would you please describe that more and better with a small sample that to reproduce the problem?

    Best wishes,
    Helen Zhou


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, October 27, 2010 3:58 AM
  • hmmm ... sounds like a MFC application and not a windows forms.

    In windows forms the menu item should be unaffected (enabled/disabled) from the settings in the forms editor if you do not something otherwise in your programm.

    If it is a MFC application then the menu item is disabled by the framework if there's no message handler assigned to handle the menu command. In that case you better ask next time in this forum: Visual C++ MFC and ATL
    • Marked as answer by Jing0Moderator Friday, November 5, 2010 10:02 AM
    Wednesday, October 27, 2010 5:15 AM