• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Popup Menu implementation on a PropertyPage

Dear All.

    I want to implement a right click popup menu on a Property page. OnRButtonDown i am able to open the menu but no menuitems are enabled. I have defind the Click messages on the Property page itself and EnableMenuItem() and ON_UPDATE.. macro are also there in the same class but nothing is working?  what should i do?

  I Created a Test application, added a dialog and OnRButtonDown i opened a Menu and it is working fine. but this is not the case in CPropertyPage.

Thanks in Advance.
- nksaxena
  • 2
1 Solution
Jaime OlivaresCommented:
OnRButtonDown i am able to open the menu but no menuitems are enabled.
I think your options are not enabled because you don't have a message handler for every option.
This also occurs with an application's main menu, when you define menu options, but you don't implement every option with a related function (usually done with ClassWizard)

nksaxenaAuthor Commented:
Thanks for replying Jaime..

   I have defined BN_CLICKED for each menu item and ON_UPDATE  UI messages to enable them in my PropertyPage, classwizards finds them easily. but they are not enabled. Perhaps things can be changed if i can create a 'View' for the PropertyPage.

nksaxenaAuthor Commented:
Hay!! i solved it ! Actually the last argument in TrackPopupMenu call was incorrect. which is a pointer to the window where all message handlers are defined.

Thanks again.
PAQed with points refunded (250)

Community Support Moderator

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now