Groups | Blog | Home
all groups > dotnet windows forms > april 2004 >

dotnet windows forms : NotifyIcon is empty when context menu is owner drawn



Eric
4/7/2004 9:04:56 PM
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=089201c3a5d7%24ae69d930%24a301280a%40phx.gbl

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

Thanks,

Eric

Ken Tucker [MVP]
4/8/2004 6:54:25 AM
Hi,

It is a known bug.

Ken
----------
[quoted text, click to view]

DalePres
4/10/2004 6:06:39 AM
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

[quoted text, click to view]

AddThis Social Bookmark Button