473,563 Members | 2,856 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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...

--
Jigar Mehta
jb*******@yahoo .co.in
Nov 17 '05 #1
3 1941
"Jigar Mehta" <jb*******@yaho o.co.in> wrote in message
news:uj******** ******@tk2msftn gp13.phx.gbl...
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_RANG E will help do what you have in mind.
--
Jeff Partch [VC++ MVP]
Nov 17 '05 #2
Hi,

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

cheers
Jagadeesh

"Jigar Mehta" <jb*******@yaho o.co.in> wrote in message
news:uj******** ******@tk2msftn gp13.phx.gbl...
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...

--
Jigar Mehta
jb*******@yahoo .co.in

Nov 17 '05 #3
Thank you very much, it solved my problem...

Jigar Mehta

"Jeff Partch [MVP]" <je***@mvps.org > wrote in message
news:ON******** ******@TK2MSFTN GP12.phx.gbl...
"Jigar Mehta" <jb*******@yaho o.co.in> wrote in message
news:uj******** ******@tk2msftn gp13.phx.gbl...
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_RANG E will help do what you have in mind.
--
Jeff Partch [VC++ MVP]


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4308
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i want to make first text as Table Heading/menu category. For examle in the given menu i want to make a heading as "Comp. Languages" which won't be a...
6
3216
by: Sandy | last post by:
Hello - I have a book that illustrates pulling menu items from a Sql Server table into an ascx via a stored procedure. Is this something that is done in the real world? I do like the effect when viewing it in the source code, however, because it doesn't show the complete path to the file. (I'm talking about Internet Explorer click...
4
3989
by: paula | last post by:
I've got a problem with asp.net i am trying to make a menu control. and have searched the web for serveral controls but they don't work correctly. I am pretty new to asp.net building. What am i looking for. i am looking for code to make a dynamical menu with submenus The menu items are stored in a MS SQL Table and when by loading the page...
10
21275
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuTopics_Show.Select Dim mShowMenuItem As MenuItem mShowMenuItem =...
1
2707
by: Chris Murphy via DotNetMonster.com | last post by:
Hi all, I'm just wondering if any one can help me with this development issue I'm having. I've created a customized treeview control to handle the particular tasks to which I'll be using it. Within the control I'm dynamically creating a context menu and assigning it to the ContextMenu property of the control -- think of this like the default...
3
2018
by: WhiteWizard | last post by:
I have an Windows app that allows users to save "bookmarks", on pages they have been to, and then navigate back to them. That all works. In addition, we have restricted them to 15 bookmarks, and if they select a 16th, the first one in is popped out. I am attaching a Context Menu to a button on the toolbar. Now they would like to be able to...
2
1856
by: trialproduct2004 | last post by:
Hi all, I am having application in whihc i am inserting menuitem dynamically. When i add menuitem to mainmenu, i want to pass extra parameter to eventargs. So what i did is derived class from eventargs and created my own variable into this class. And then while setting eventhandler i am passing this custom event args. But this is not...
3
3001
by: =?Utf-8?B?ZWFndWlsYXI=?= | last post by:
Hi, I am trying to dynamically generate a menu, based on entries on a text or xml file. The text file contains the "tree" after which the menu will need to be created. Something like the following: Level 1 -- Level 2 -- Level 2 Level 1
3
3801
by: Question123 | last post by:
Hi... i have added 5 menu items in my menu control dynamically from database.when i click Item1 it redirect me to Page1 and Item1 color changes to selected. when i click Item2 it redirect to Page2 and Item1 color changes to selected. But still Item1 colors is selected. I just want only one menu item should be with selected item style. ...
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.