473,785 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NotifyIcon is empty when context menu is owner drawn

I implemented owner drawing on the main and context menus of my main form.
It works fine.

There is also a notify icon control that has a context menu. When the icon
is in the status bar, it works perfectly fine when it is double-clicked.
However, when I try to initialize the notify icon's context menu as an
owner-drawn menu, all the text in that menu disappears.

Is owner drawing a notify icon's context menu possible? I saw someone else
having the same problem:
http://groups.google.com/groups?selm...280a%40phx.gbl

Any ideas, resources, etc., are greatly appreciated!

Thanks,

Eric
Nov 20 '05 #1
4 1576
Hi,

It is a known bug.

Ken
----------
"Eric" <er**@askthepcp ro.com> wrote in message
news:O2******** *****@TK2MSFTNG P09.phx.gbl...
I implemented owner drawing on the main and context menus of my main form.
It works fine.

There is also a notify icon control that has a context menu. When the icon is in the status bar, it works perfectly fine when it is double-clicked.
However, when I try to initialize the notify icon's context menu as an
owner-drawn menu, all the text in that menu disappears.

Is owner drawing a notify icon's context menu possible? I saw someone else having the same problem:
http://groups.google.com/groups?selm...280a%40phx.gbl
Any ideas, resources, etc., are greatly appreciated!

Thanks,

Eric

Nov 20 '05 #2
Hi,

It is a known bug.

Ken
----------
"Eric" <er**@askthepcp ro.com> wrote in message
news:O2******** *****@TK2MSFTNG P09.phx.gbl...
I implemented owner drawing on the main and context menus of my main form.
It works fine.

There is also a notify icon control that has a context menu. When the icon is in the status bar, it works perfectly fine when it is double-clicked.
However, when I try to initialize the notify icon's context menu as an
owner-drawn menu, all the text in that menu disappears.

Is owner drawing a notify icon's context menu possible? I saw someone else having the same problem:
http://groups.google.com/groups?selm...280a%40phx.gbl
Any ideas, resources, etc., are greatly appreciated!

Thanks,

Eric

Nov 20 '05 #3
You can have a context menu on a notify icon and it will work fine. What
you can't have is an owner drawn context menu because NotifyIcon doesn't
pass the DrawItem or MeasureItem events to the ContextMenu.

See KB #827043.

Dale

"Eric" <er**@askthepcp ro.com> wrote in message
news:O2******** *****@TK2MSFTNG P09.phx.gbl...
I implemented owner drawing on the main and context menus of my main form.
It works fine.

There is also a notify icon control that has a context menu. When the icon is in the status bar, it works perfectly fine when it is double-clicked.
However, when I try to initialize the notify icon's context menu as an
owner-drawn menu, all the text in that menu disappears.

Is owner drawing a notify icon's context menu possible? I saw someone else having the same problem:
http://groups.google.com/groups?selm...280a%40phx.gbl
Any ideas, resources, etc., are greatly appreciated!

Thanks,

Eric

Nov 20 '05 #4
You can have a context menu on a notify icon and it will work fine. What
you can't have is an owner drawn context menu because NotifyIcon doesn't
pass the DrawItem or MeasureItem events to the ContextMenu.

See KB #827043.

Dale

"Eric" <er**@askthepcp ro.com> wrote in message
news:O2******** *****@TK2MSFTNG P09.phx.gbl...
I implemented owner drawing on the main and context menus of my main form.
It works fine.

There is also a notify icon control that has a context menu. When the icon is in the status bar, it works perfectly fine when it is double-clicked.
However, when I try to initialize the notify icon's context menu as an
owner-drawn menu, all the text in that menu disappears.

Is owner drawing a notify icon's context menu possible? I saw someone else having the same problem:
http://groups.google.com/groups?selm...280a%40phx.gbl
Any ideas, resources, etc., are greatly appreciated!

Thanks,

Eric

Nov 20 '05 #5

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

Similar topics

2
513
by: Rob Mayo | last post by:
OK, maybe this is my opinion, maybe these are bugs. Given the folowing: I have a NotifyIcon on my Form, a Context menu associated with the NotifyIcon, and a MenuItem on the ContextMenu set as default. When the default MenuItem is clicked, there is code to no longer show the NotifyIcon. What I feel should happen is when I double-click the NotifyIcon in the system tray, it should perform the default menu item's Click event.
0
1812
by: James | last post by:
Is there a way to Owner drawn tray context menu ? - I know that there is a bug with the custom drawing of a context menu assigned to a tray icon - but I was hoping someone could advise me as to how to create one from scratch - I have tried using the current cursor position to pop up a context menu that is not assigned to a tray icon - but with no joy.. Any advice please... -- James
0
1378
by: A | last post by:
I know it doesn't work. But I'm really trying to figure out is when it might work. Does anyone from MSFT know? or perhaps anyone else in the ng know? I have an application that is entirely run via the context menu in a NotifyIcon and it's rather frustrating that this hasn't worked ever. Has anyone successfully created a workaround for this? Thanks, Akshay
2
2521
by: Eric | last post by:
I implemented owner drawing on the main and context menus of my main form. It works fine. There is also a notify icon control that has a context menu. When the icon is in the status bar, it works perfectly fine when it is double-clicked. However, when I try to initialize the notify icon's context menu as an owner-drawn menu, all the text in that menu disappears. Is owner drawing a notify icon's context menu possible? I saw someone...
2
2926
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to the menu, it seems to disappear. This only breaks when the context menu is tied to a NotifyIcon - not to any other control. Below is a C# file for a form which should illustrate this (at least it does on my machine!). The same contextmenu is...
0
1915
by: Andrew Baker | last post by:
Have a look at the code below. It's a really simple example where I have added two controls to a form, a textbox and a combo box. Both add owner drawn context menus to the controls, but the combobox will NOT draw custom drawn context menu item. I have tried EVERYTHING (deriving from MenuItem and even tried calling TrackPopupMenuEx directly), but it just won't work! I am currently reflecting over the combobox source code (oh joy!), but...
2
2084
by: stillcoding | last post by:
Hi I have a problem with memory usage increasing when I right click to display the context menu on a notifyIcon OS: Windows XP Professional SP2 Software: VS2005 Professional edition SP1 The steps to recreate my problem are as follows: Start a new c# windows application
0
9646
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10096
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
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
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.