Good Programmers Needed Here...

I'm trying to release my new version of iTunes plugin but have run into some problems.. It's a problem that wouldn't be a problem with any other standard windows application but iTunes is a little punk and has the wierdest and stupidest way of handling event.. Anyhow, enough with the rant.. Let me explain..

I created a plugin for iTunes.. This plug-in allows a few things..

1. Always on Top

2. Minimize to SysTray

3. Set Alpha Transparency of Mini Mode Window

4. Display Current Playing Song info in ToolTip of systray Icon..

i currently have all this working just fine and its awesome.. What i want to do, is modify the systray's right click menu and add items to it to add extended functionality to it.. For example a Plugin Option's menu.. Now, if you are into Win32 programming, we all know a windows menu can be retreived with the API call GetMenu(hwnd); this will return the handle to the MAIN Menu.. from there, u can get the submenu with GetSubMenu(hwnd, intPos); ..

If i attempt to use GetMenu(hwnd); with iTunes main window, a menu handle is returned, but using GetSubMenu, I cannot retrieve anything.. iTunes loads up multiple windows that handle differnet events for menus and things.. If you use EnumWindows and check for the classname "iTunes" you will recieve 3 windows.. One with the caption "iTunes" then one with "Equalizer" then one that has a random caption.. This window handles the systray icon messages and Menu.. Unfortunatley, i cannot seem to retrieve any submenu handles for anything..

I was thinking i could simply replace the menu with my own, which i did and allowed for Play, Next, Previous options to be there, but unfortutanley could not emiulate the Repeat functions and shuffle functions.. I emulated the play, next and previous by using PostMessage and sending the associated hotkey.. but the repeat and shuffle functions do not contain an associated hotkey..

Any Ideas ????

- Evolution

#73319

Wow, this is the third time I am suggesting this site this week. http://www.planetsourcecode.com They have a whole community of programmers that submit bits of code. They even have a forums so you can get help. These people also really know their stuff. As always, the note, you need to become a member after viewing 5 pieces of code, hey, it's free.

#73339

Originally posted by wizard@Nov 4 2003, 01:24 PM

Wow, this is the third time I am suggesting this site this week. http://www.planetsourcecode.com They have a whole community of programmers that submit bits of code. They even have a forums so you can get help. These people also really know their stuff. As always, the note, you need to become a member after viewing 5 pieces of code, hey, it's free.

But you make it look so sexy! That is an awesome site.

#73364

sounds sweet, unfortuantaly i cant help you with coding.

#73405

well, GetMenu() doesn't retrieve the whole menu ? including sub menus? I think it does.

Second, if the iTunes coders coded it well, the menus are implemented as messages, not as a return value (TrackPopupMenu() can do that). So there a WM_MENU* (i think) message for every option in the menu.

Run Spy++ and spy the WM_MENU* messages of the window that handle messages.

Look over lParam and wParam :)

Then, you simply send similar messages to this window

Hope you'll suceed :)

#73479

www.sourceforge.net has a few iTunes plugins (I know I use the OGG one).

So check that out,for all your open source needs.

#73493

Originally posted by siwu@Nov 4 2003, 08:53 PM

well, GetMenu() doesn't retrieve the whole menu ? including sub menus? I think it does.

Second, if the iTunes coders coded it well, the menus are implemented as messages, not as a return value (TrackPopupMenu() can do that). So there a WM_MENU* (i think) message for every option in the menu.

Run Spy++ and spy the WM_MENU* messages of the window that handle messages.

Look over lParam and wParam :)

Then, you simply send similar messages to this window

Hope you'll suceed :)

No, GetMenu retrieves the handle to then MENU associated with that window.. then from there, you can retrieve submenus using GetSubMenu.. I have used SPY ++ and the menus are created dynamically.. As soon as lets say a WM_RBUTTONDOWN message is received at the systray, the menu is created and then displayed.. I know this, because the menu handle that is recieved by WM_MENUSELECT is different each time and when you use a static menu, your Handle doesn't change, the problem is, there is no WM_INITMENUPOPUP message being sent when this occurs.. There is a WM_MENUSELECT message but that only occurs, well, when you hover over a menu item..

Then there is the WM_ENTERIDLE message which is activated when a menu or something of that nature is displayed.. It does return a handle to the the menu's containing window, but it doesn't seem that its a valid handle..

- Evolution

#73520