A newbie question I suppose, but here goes anyway..
Can someone explain what subclassing is and why you'd use it?


Posted on 2002-10-27 18:46:48 by dlburlin

The reason why you need to subclass some controls is that thy are created with a predefined class so there is nowhere to put the address of a message handling procedure.

What a subclass does is "hook" into the message path so that the program can process or modify the messages that are sent to the control.

There is a tool in MASM32 that creates the subclass procedures for controls and it generates the correct type of code to do it.

You would normally subclass a control like a list box so that you can specify the action you want to take on a mouse click or double click. Effectively any control you want to process can be done with a subclass procedure.


Posted on 2002-10-27 19:06:51 by hutch--
Hutch.... thanks for taking time to enlighten me!
Posted on 2002-10-28 08:13:28 by dlburlin