Using this library it will be very easy
for you to subclass any window and intercept any messages that you specify.
- 31.05.1998, version 1.01: version 1.0 didn't
allow you to change the hWnd of the object you were subclassing, once it was already
subclassed. Now you can do it.
- 12.05.1998, version 1.0 released.
- hWnd. Set here the hWnd of the window you
want to subclass.
- Message (lMessage As Long) As Boolean. Use
this property to get/set the messages that you want to intercept in the subclassed window.
Ex.: Message (&H200) = True.
- WindowProc (hWnd As Long, iMessage As Long, wParam As
Long, iParam As Long, Res As enProcessed). This is the event that will be fired when
messages are intercepted. You can set Res to
Processed (0) if you processed the message or
to [Send to Old Proc] (1) if you want to send the message to other processes that might be
waiting for it.
To have access to the event provided by this variable,
you will have to dim the object using the WithEvents modifier. Here is a short example:
In the declarations section of the form:
Private WithEvents m_Subclass As ARSubclass
In the Load event of the form:
Set m_Subclass = New ARSubclass
m_Subclass.hWnd = Me.hWnd
Included in the ZIP there is a short example on
subclassing using this library.
© Alvaro Redondo, 1998. All Rights Reserved.