Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 18th September 2006, 04:19   #1
deming
Junior Member
 
Join Date: Jun 2006
Posts: 7
problems with subclassing winamp window

1 : if the skin is "modern" , there seems no approaches to get the proper rect of winamp window
2 : code clip:
if(WinampVersion>0x2000 && SkinIsClassic)
pOrigProc =(WNDPROC)SetWindowLong(pWinampWnd, GWL_WNDPROC,(LONG)HookWinampWnd);

Ok, everything is ok, I can drag the winamp window with my dsp plugin window docking to it, and winamp can work or shut down properly with my dsp plugin working/unworking.

But, when my dsp plugin is working, selecting "none" or other dsp plugin in preference page would cause winamp crash.
deming is offline   Reply With Quote
Old 18th September 2006, 04:23   #2
deming
Junior Member
 
Join Date: Jun 2006
Posts: 7
The crash of DSP plugin switch would disappear if my plugin work without subclassing

The crash of DSP plugin switch would disappear if my plugin work without subclassing
deming is offline   Reply With Quote
Old 18th September 2006, 04:27   #3
Benski
Ben Allison
Lead Developer
Winamp Dev Team
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Ashburn, VA
Posts: 1,018
Re: problems with subclassing winamp window

Quote:
Originally posted by deming
2 : code clip:
if(WinampVersion>0x2000 && SkinIsClassic)
pOrigProc =(WNDPROC)SetWindowLong(pWinampWnd, GWL_WNDPROC,(LONG)HookWinampWnd);

Ok, everything is ok, I can drag the winamp window with my dsp plugin window docking to it, and winamp can work or shut down properly with my dsp plugin working/unworking.

But, when my dsp plugin is working, selecting "none" or other dsp plugin in preference page would cause winamp crash.
This is because Winamp calls FreeLibrary() on your dsp_* plugin when it's done with it. You could unsubclass in Quit(), but there's no guarantee that someone hasn't subclassed over top of you. What are you trying to do? Maybe there's an alternative to subclassing that could be used.
Benski 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