Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 26th October 2005, 23:36   #1
patheticpat
Junior Member
 
Join Date: Oct 2005
Posts: 2
Sending messages to minimized Winamp Window

Hello,

I am currently writing a small plugin that lets me control Winamp with the mediakeys of my Acer Notebook. I am registering a global hook that intercepts the commands and sends appropriate messages to Winamp:
code:
LRESULT CALLBACK MyShellProc(int nCode, WPARAM wParam, LPARAM lParam)
{
...
if (nCode == HSHELL_APPCOMMAND) {
short AppCommand = GET_APPCOMMAND_LPARAM(lParam);
switch (AppCommand) {
case APPCOMMAND_MEDIA_NEXTTRACK:
PostMessage(_plugin.hwndParent, WM_COMMAND, WINAMP_BUTTON5, 0);
return 1;
case APPCOMMAND_MEDIA_PLAY_PAUSE:
// similar code for other commands
}
}
...
}


This is working fine as long as Winamp isn't minimized into the system tray. Why does it stop working? The window should still process the messages I am sending . Any help on this would be appreciated.
patheticpat is offline   Reply With Quote
Old 27th October 2005, 09:30   #2
patheticpat
Junior Member
 
Join Date: Oct 2005
Posts: 2
Problem solved: In order for this code to work the plugin has to live in a shared segment of the DLL.
patheticpat is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump