Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 20th June 2002, 20:49   #1
tbdombrosky
Junior Member
 
Join Date: Jun 2002
Posts: 4
Gen plugin getmessage help

I'm creating a frontend plugin for winamp that has a fullscreen display where you can browse using the keyboard and select files to play. In order to use this I need to be able to receive messages. I downloaded the gen example but it doesn't receive messages (tested by putting a messagebox in the wndproc function). I tried making a while loop of getmessage in the init() but got invalid declaration of MSG when I did "MSG msg".

Basically what I need to do is, create a full screen window that can receive windows messages. I have the full screen part down fine (I'm using allegro which works fine with the plugin api). I just need to know when certain messages are sent to winamp (like keyboard hits and power shutdown messages).

The gen plugin example didn't receive messages (or didn't seem to since WNDPROC was never being called). If anyone knows how to do this I would greatly appreciate any help. Basically, I just added to the gen example so I'm not using MFC. Thanks.

Tom
tbdombrosky is offline   Reply With Quote
Old 20th June 2002, 21:54   #2
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
winamp doesnt send back messages, you'll have to poll all the values you need
Gourou is offline   Reply With Quote
Old 20th June 2002, 22:42   #3
tbdombrosky
Junior Member
 
Join Date: Jun 2002
Posts: 4
How exactly would I do that? I put this in the end of the init() function and it caused an endless loop that never ran wndproc():


while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}



Basically I want to get wndproc to run in the plugin so I can process messages. How would I do that (and in what function, ex. init, config)?

Thanks.

Tom
tbdombrosky is offline   Reply With Quote
Old 21st June 2002, 00:39   #4
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
why are you catching all the commands, why not just use the APIs? I do vb, to do what your doing, one needs subclassing. If your making a front end, you dont need to sublcass all the calls, all you need to do is send your own to play selected songs, and to get the playlist and maybe the title, and time, all that has been made easier, go look in NSDN at the API section, that should be all you need, and I would think, a lot easier than catching all the calls to winamp
Gourou is offline   Reply With Quote
Old 21st June 2002, 01:46   #5
tbdombrosky
Junior Member
 
Join Date: Jun 2002
Posts: 4
I'm going to use this frontend in a car stereo player. I need to know when the system goes into hibernation because I have to clear the buffer so it doesn't skip when it comes out of hibernation.

I got it to work for the most part. I just can't detect when winamp closes. That's the only problem I have right now. A WM_DESTROY message is not sent apparently when I hit the close button.

Tom
tbdombrosky is offline   Reply With Quote
Old 21st June 2002, 02:32   #6
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
this is why I do not write plugins
Gourou is offline   Reply With Quote
Old 21st June 2002, 02:34   #7
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
doesnt your quit() sub get run instead of a message moving around?
Gourou is offline   Reply With Quote
Old 21st June 2002, 02:47   #8
tbdombrosky
Junior Member
 
Join Date: Jun 2002
Posts: 4
I'm a moron. The only reason it wasn't processing the messages was because I was using the debug version instead of the release version. WNDPROC works fine now. Thanks to all.

Tom
tbdombrosky is offline   Reply With Quote
Old 21st June 2002, 13:13   #9
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
Gourou 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