A newbie question I suppose, but here goes anyway..
Can someone explain what subclassing is and why you'd use it?
thanks!
:stupid:
:confused:
Can someone explain what subclassing is and why you'd use it?
thanks!
:stupid:
:confused:
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.
Regards,
hutch@movsd.com
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.
Regards,
hutch@movsd.com
Hutch.... thanks for taking time to enlighten me!
regards,
regards,