Hi Everybody,
I need your help.
I have MS Visual Studio .NET 2003. I noticed that if I added a context menu
to a form. It will not work, unless you add the line:
This ->ContextMenu = this->contextMenu;
manually.
Can anybody tell me why?
IF you have the book named:
Microsoft visual c++ .net step by step made by Microsoft press, you
find this example in chapter 16 page 317
Ben Voigt - 19 Feb 2007 22:02 GMT
> Hi Everybody,
>
[quoted text clipped - 8 lines]
>
> Can anybody tell me why?
You can usually assign that using the designer, but yes it's necessary to
assign a specific context-menu. This is because you could store multiple
context menu controls on a form, but one is for the form itself, one is a
right-click menu for a grid, one for a text-box, etc. The runtime has no
way of knowing how they pair up until you tell it.