473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Adding a menu on the fly

Hi,

I know to add a menu entry on the fly using AppendMenu(...) and i know how
to remove it using RemoveMenu(...)
I can even create a popup menu on the fly but the question is how do i
remove it?

HMENU hmenupopup= CreateMenu();
AppenMenu( hmenupopup, flags);
AppenMenu( hmenupopup, flags);

then the main menu
AppenMenu( hmenu , flags, (UINT)hmenupopup, ... );

Thanks
Nov 22 '05 #1
1 1314
Hi Sims,

Shouldn't you rather use MainMenu and ContextMenu classes?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Sims" <si*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

I know to add a menu entry on the fly using AppendMenu(...) and i know how
to remove it using RemoveMenu(...)
I can even create a popup menu on the fly but the question is how do i
remove it?

HMENU hmenupopup= CreateMenu();
AppenMenu( hmenupopup, flags);
AppenMenu( hmenupopup, flags);

then the main menu
AppenMenu( hmenu , flags, (UINT)hmenupopup, ... );

Thanks

Nov 22 '05 #2

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

Similar topics

10
by: David | last post by:
Can anyone give me a quick code snippet (that is standards-based) for adding OPTION tags to a SELECT dynamically. I have no problem doing it in IE but I am kind of new to the whole standards world...
4
by: Aaron Queenan | last post by:
How can I use the designer to add a context menu to a class which inherits from a control, e.g. treeview, without adding the context menu to a form? For example, to add a context menu with...
0
by: Claire | last post by:
When I run the following code through on the first round, my sub-menu (branched off mnuOpenPorts menuitem) shows a nice list of ports. When it gets run through on the 2nd pass, the sub menu...
4
by: Claire | last post by:
Sorry Ive added this twice (sortof) but if I'd added an addendum to the first one then this would probably have been ignored. This problem affects a ContextMenu attached to a NotifyIcon object. I...
10
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...
2
by: MCM | last post by:
I'm working on a plotting control. The plotting control will have a context menu with basic commands for "scaling", "zooming", etc. Is there a way that, from the parent form, I can add more...
1
by: Preeti | last post by:
Hi all I am a fresher and have been given a requirement in VB.net I have to make an application in VB.net which will run as a system tray icon and will add one or two items in the default...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
0
by: sony.m.2007 | last post by:
Hi, I'm trying to add a contextmenu(adding my custom context menu) to windows explorer. This context menu has to be shown for all files and folder Th new context menu will be like this ...
2
by: RLN | last post by:
I was at this link to add a menu bar to my Access app. http://office.microsoft.com/en-s/access/HP051890341033.aspx I got the menu bar added, but had some more questions about it. In the link...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.