Difference between revisions of "Subclassing"

From Winamp Developer Wiki
Jump to: navigation, search
(New page: == Subclassing == Subclassing is a technique common to Windows development. It involves supplying your own window function for someone's window, and changing behavior by supplying your o...)
 
m (Protected "Subclassing" [edit=autoconfirmed:move=autoconfirmed])
 
(No difference)

Latest revision as of 15:13, 25 September 2008

Subclassing

Subclassing is a technique common to Windows development. It involves supplying your own window function for someone's window, and changing behavior by supplying your own logic for processing certain messages.

Because your plugin is given Winamp's HWND during initialization, it is possible for your plugin to subclass Winamp's main window. Since the Send Message API is built by sending messages to the Winamp window, your plugin can do a great deal without even effecting the UI. From simple notifications (e.g. Winamp sends msg=WM_WA_IPC, wParam=IPC_CB_MISC_TITLE, lParam=IPC_CB_MISC on song change) to radically altering behavior (e.g. Winamp checks the return value of msg=WM_WA_IPC, lParam=IPC_GET_NEXT_PLITEM to allow plugin's to override playlist playback order).