Discussion Locked

How do I manage dynamic menus in MFC/VC+

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

OS Type: Windows
OS Version: Windows NT 4.0
RAM: 128 MB
Category: Operating System
Type: General Support
Skill Level: Intermediate

Detail Description: I have a window with
an IDR_XXX menu resource associated.
One of the entries on the menu bar is
"Change". I want to be able to dynamically
add entries under this pop-up (in the
resource there are none under this
pop-up, but there are entries under other
pop-ups before and after this one), two of
which are to be sub-menus. I have poked
around but cannot find examples of how
to:

1. How do I get a reference to the pop-up?
I need this to add menu entries.

2. How do I determine the appropriate
identifier code to be associated with each
menu item I add?

3. How do I capture the message that
would permit me to enable/disable
entries in the pop-up that are added at
runtime?

3. How do I detect which entry in the
pop-up menu a user has selected?

4. How do I add and populate a
sub-menu wit

3 replies

by invite_anil

well,when you create your resource you can call the particular function and from there you can write your own code either by using the class wizard,and calling the particular function from that menu.
eg on clik() followed by the parameter that you want to call.
bye

This discussion is closed to new replies.