INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: [C#] Handling right click for Display plugins  (Read 3867 times)

neFAST

  • Galactic Citizen
  • ****
  • Posts: 372
  • \o/
[C#] Handling right click for Display plugins
« 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!
Logged

neFAST

  • Galactic Citizen
  • ****
  • Posts: 372
  • \o/
Re: [C#] Handling right click for Display plugins
« Reply #1 on: November 20, 2008, 05:12:38 pm »

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: [C#] Handling right click for Display plugins
« Reply #2 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
}
Logged
Matt Ashland, JRiver Media Center

neFAST

  • Galactic Citizen
  • ****
  • Posts: 372
  • \o/
Re: [C#] Handling right click for Display plugins
« Reply #3 on: November 24, 2008, 12:33:38 pm »

Hum looks like the code I found in the SDK.
Any clue regarding the required includes?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: [C#] Handling right click for Display plugins
« Reply #4 on: November 24, 2008, 03:12:51 pm »

I love the bump  ;D

neFAST

  • Galactic Citizen
  • ****
  • Posts: 372
  • \o/
Re: [C#] Handling right click for Display plugins
« Reply #5 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.  ?
Logged
Pages: [1]   Go Up