|AR Subclass ActiveX Library 1.01
library it will be very easy for you to subclass any window and
intercept any messages that you specify.
Version 1.0 released.
1.01 31.05.98: 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.
- hWnd. Set
here the hWnd of the window you want to subclass.
(lMessage As Long) As Boolean. Use this property to
get/set the messages that you want to intercept in the
subclassed window. Ej.: 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 Subclass As ARSubclass
In the Load event of the
Set Subclass = New ARSubclass
Included in the ZIP there is a
short example on subclassing using this library.
© Alvaro Redondo, 1998. All Rights Reserved.