How to get notification of menu click added dynamically???

J

Jigar Mehta

Hye,
This is Jigar mehta from India. I have made one application that adds
dynamic menu items from the database. Each menu item has one ID and menu
item's text is coming from the database. Now, I want to get the notification
of the menu item click which is added dynamically. I want to put one common
routine where I can distinguish between all menu item clicks. Menu Items can
be two or hundred. So, how to make one handler that will be invoked with
parameter of the clicked menu ID...

Please help me out...
 
J

Jeff Partch [MVP]

Jigar Mehta said:
Hye,
This is Jigar mehta from India. I have made one application that adds
dynamic menu items from the database. Each menu item has one ID and menu
item's text is coming from the database. Now, I want to get the notification
of the menu item click which is added dynamically. I want to put one common
routine where I can distinguish between all menu item clicks. Menu Items can
be two or hundred. So, how to make one handler that will be invoked with
parameter of the clicked menu ID...

See if using ON_COMMAND_RANGE will help do what you have in mind.
 
J

Jagadeesh

Hi,

Use ON_COMMAND_RANGE inside your Message map with IDs starting from your
first menu item to the last menu item.

cheers
Jagadeesh
 
J

Jigar Mehta

Thank you very much, it solved my problem...

Jigar Mehta



Jigar Mehta said:
Hye,
This is Jigar mehta from India. I have made one application that adds
dynamic menu items from the database. Each menu item has one ID and menu
item's text is coming from the database. Now, I want to get the notification
of the menu item click which is added dynamically. I want to put one common
routine where I can distinguish between all menu item clicks. Menu Items can
be two or hundred. So, how to make one handler that will be invoked with
parameter of the clicked menu ID...

See if using ON_COMMAND_RANGE will help do what you have in mind.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top