What does Handle refer to in this case

  • Thread starter Thread starter SamSpade
  • Start date Start date
S

SamSpade

If I have a class that inherits from, say RichTextBox and in the derived
class I refer to Handle, does it refer to the RichTextBox class or the
derived class?

I'm wondering if the derived class gets it's own handle or is there only one
for both classes (after all there is only one window)?


Thanks
 
SamSpade said:
If I have a class that inherits from, say RichTextBox and in the
derived class I refer to Handle, does it refer to the RichTextBox
class or the derived class?

The Handle is the "native" window handle that windows returns when a new
window/control is created.
I'm wondering if the derived class gets it's own handle or is there
only one for both classes (after all there is only one window)?

As there is only one instance, there is only one handle. If you create an
instance of RichtextBox, it has it's own handle. If you create an instance
of a class derived from RichtextBox, it has also it's own handle.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Thanks, I was pretty sure that was the case but needed confirmation because
of something strange that is happening.

Something that worked before I split a usercontrol into a derived class and
a usercontrol no longer works.
 
* " SamSpade said:
Thanks, I was pretty sure that was the case but needed confirmation because
of something strange that is happening.

Something that worked before I split a usercontrol into a derived class and
a usercontrol no longer works.

Feel free to post parts of the code if you are not able to solve the problem.
 
Back
Top