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
Aqua-Soft Forums