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

Thread: Menu Item Check

  1. #1
    Join Date
    Apr 1999
    Posts
    76

    Menu Item Check

    I created a menu item and selected popup on the resource editor. I then added 6 menu items added callbacks and all works fine. I set the checked resource for the first menu item in the resource editor but don't know how to make the last menu item selected be the checked item. I'm using Visual C++ 6.0.


  2. #2
    Join Date
    Apr 1999
    Posts
    76

    Re: Menu Item Check

    Well I solved the problem two different ways. The first way was to add a OnInitMenu(CMenu* pMenu) method and save the menu pointer to a class attribute. Then in the callback I used the pointer to acces a CheckMenuItem() method. I then realized that I could get the pointer in the callback buy calling GetMenu() and saving the return value. It seems to be cleaner and I'm concerned about saving a pointer at initialization that could pose a problem later on.


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