Let me save everyone a whole lot of time searching MSDN for info on the proper way to subclass windows using Win32 API calls... Download my DLL at SuperTemplate 1.1
. Actually you only need one c++ file in my DLL Template, safe-subclass.cpp (will most likely be posted separately on mircscripts.org soon)... BTW, If handled properly, it doesn't matter what message is used to unsubclass... And if you use "safe-subclassing.cpp" it wont matter which you use either.
Basically, Any DLLs created using this subclassing process, can subclass the same window at the same time, AND neither needs to know about the other to unsubclass. This means it doesn't matter what order the DLLs are unsubclassed (unloaded) or what message they use to unsubclass...
And yes, either WM_DESTROY (Destroy Window Message) or WM_QUIT (Hwnd should be eliminated) can be used to unsubclass when the window is closed.