CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Property Sheet and Menus

    I have written a program who's main window is a property sheet (CPropertySheet).

    Since the window of this property sheet is built automatically outside of the resource editor, how would I add a menu to the application?

    Thanks


  2. #2
    Guest

    Re: Property Sheet and Menus

    Hi!

    The following steps should help U out :

    1. Add a menu in the resource editor. Say its id is IDR_MYMENU.
    2. Add the following code in the OnInitDialog() function of your CPropertySheet derived class.

    // START OF CODE

    CMenu mnu;
    mnu.LoadMenu(IDR_MYMENU);
    SetMenu(&mnu);
    DrawMenuBar();
    mnu.Detach();

    // END OF CODE


    This will display the menu as u desire

    HTH


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured