INTERACT FORUM

Windows => Plug-in Development => Topic started by: neFAST on November 19, 2008, 01:30:27 pm

Title: [C#] Handling right click for Display plugins
Post by: neFAST on November 19, 2008, 01:30:27 pm
Hello, today my problem is quite simple to describe.
I'm building a display plugin, and I would like to follow recommendations from the wiki: adding a sub-menu to the existing one that pop when right clicking on those plugins. For example the trackinfo sumenu allows you to chose a skin.

I have found an example in the SDK. Is the IMenuEx.h file still up to date? How can I use it with my C# plugin.

Any help will be greatly appreciated.
Thanks a lot!
Title: Re: [C#] Handling right click for Display plugins
Post by: neFAST on November 20, 2008, 05:12:38 pm
(http://www.chathamgirlsgrammar.medway.sch.uk/pages/common/events/2003/Marathon/pictures/Mr%20Bump.jpg)
Title: Re: [C#] Handling right click for Display plugins
Post by: Matt on November 24, 2008, 11:54:45 am
I'm not sure about the C# part, but here's C++ code:

Handle the windows message UM_CONTROL_BAR_COMMAND.

if ((wParam == CB_FILL_MENU) && (lParam != NULL))
{
    IMenuEx * pMenu = (IMenuEx *) lParam;
    // TODO: add menu items starting at ID: DISPLAY_MENU_ID_MIN
}
else if (wParam == CB_PROCESS_MENU_COMMAND)
{
    MENU_INFO * pInfo = (MENU_INFO *) lParam;
    // TODO: process menu return by looking at pInfo->nID
    // return TRUE if handled, FALSE otherwise
}
Title: Re: [C#] Handling right click for Display plugins
Post by: neFAST on November 24, 2008, 12:33:38 pm
Hum looks like the code I found in the SDK.
Any clue regarding the required includes?
Title: Re: [C#] Handling right click for Display plugins
Post by: Mr ChriZ on November 24, 2008, 03:12:51 pm
I love the bump  ;D
Title: Re: [C#] Handling right click for Display plugins
Post by: neFAST on November 26, 2008, 08:58:40 am
Yep but unfortunately it seems that I'm the first one to try messing with the menu un a c# plugin.  ?