@marsjell
Here's the C++ code that I'm using:
I have two message procs in one Called WndProc which handles messages from my windows and one called WinampWndProc that I use to grab the winamp messages.
when the program starts (DLL init's) I repace winamps WndProc with my own:
In this case I have the hwnd (as it's a DLL plugin), I guess that if you want to do this then it would have to be a DLL.
//Get the original proc address
lpWndProcOld = (void *) GetWindowLong(plugin.hwndParent,GWL_WNDPROC);
//Set the address where winamp's win proc is
SetWindowLong(plugin.hwndParent,GWL_WNDPROC,(long) WinampWndProc);
so in WinampWndProc:
LRESULT CALLBACK WinampWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if(iwant the message)
do something with it
else
return CallWindowProc((long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long))lpWndProcOld,hwnd,message,wParam,lParam) ;
}
Anyway that's the C++ version, perhaps someone could post the VB equivalent?
~MGP3Car



LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks