This library allows programmers to safely subclass and unsubclass any windows, of any class, in any order, any time. The only restriction is that all subclassed windows MUST belong to the same thread.

It's particularly useful to do this in applications that support addins (also called plugins) that can be loaded or unloaded at arbitrary times. Using this library, the addins can subclass any windows belonging to the main application or other addins.

A linked list is mantained to keep the data belonging to each subclassed window. In turn, for each window there is a linked list of window procedures. In all lists items will be inserted in the beginning, so recently added window procedures will be executed first. This mimics the behavior of a "normal" subclassing chain.

The code was tested under Win98SE, but should work OK in any other Windows version.

As usual any feedback is welcome. :)
Posted on 2004-04-11 15:45:39 by QvasiModo
Hi,

I will definately use it for the WinAsm Studio Add-Ins. Thanks for the good work. If I face any problems with it I will let you know.

Regards,

akyprian
Posted on 2004-04-12 14:41:16 by akyprian
Great! :alright:
Here's a new version (1.01) that will fit your purposes better... I've added a new function (GetNextWndProc) that takes only 2 parameters. That way it can be supported as a window message too. :)
Posted on 2004-04-12 14:47:45 by QvasiModo
BTW, has anyone tried the C++ header? It's the only thing I didn't test.
Posted on 2004-04-13 10:08:20 by QvasiModo
Updated (version 1.02).
Now it's thread-safe. :)

I would strongly recommend to keep all versions under different names, then link to the one you need. That would minimize the code overhead by using the implementation that has only the features the app really needs.
Posted on 2004-04-16 15:18:40 by QvasiModo