• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Resources on SubClassing

Does anyone have any good resources on SubClassing, preferrably On-Line.

Busically I'm just wanting to know the theory behind subclassing, and practices.

Just trying to become a better VB Programmer

Thanks
0
raizon
Asked:
raizon
1 Solution
 
SimonORorkeCommented:
I recommend VBAccelerator's free subclassing utility (includes source) http://www.vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm.  The documentation on the web page gives quite a good introduction to subclassing in general.

If you want the detail on exactly what you can subclass, I recommend you invest in Dan Appleman's classic "Guide to the Win32 API".  That also include a general introduction to subclassing and the Message Reference section of the chapter on General Windows Messages has a sub-heading Use with Subclassing for each Windows message which can be subclassed.
0
 
amebaCommented:
Subclassing is not good practice in business applications.  It is too hardcore and maintenance is problematic.

But it is good to know it.

If you use it in real app, make sure there is a very good reason.
0
 
SimonORorkeCommented:
In my previous comment the name of Dan Appleman's book should have been "Visual Basic Programmer's Guide to the Win32 API".  For further info on this book, see the page on Appleman's web site http://www.desaware.com/VBPGWin32APIL2.htm.

I'd just add to ameba's comment of caution by saying that if you do use subclassing in production applications, I would recommend providing clear and detailed documentation of what you are doing.  In an application I recently wrote with a great deal of subclassing, there are more comment lines than lines of code in the rather large subclassing procedure.  When someone else has to maintain the program, there's a good chance they will not know much about subclassing, so I've tried to help them get into it if they have to.
0
 
raizonAuthor Commented:
Thanks to everyone for the comments.

This article and book reference was the most helpful.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now