0

I'm working with the tree control i wanted to handle item expansion or collapsing, finally i found that the tree send' an notification TVN_ITEMEXPANDING to it's parent window, as mentioned in this page http://msdn.microsoft.com/en-us/library/windows/desktop/bb773537(v=vs.85).aspx

I'm writing a tree class that will be reused in other windows and inherited i want to handle that event the wndProc of the tree independently of it's parent. like .NET

how can this be done??

I'm inheriting from TTreeWindow class of OWL library I'm now depending on the dialog that hosts the tree it receives the notification in its wndProc

ahmedsafan86
  • 1,677
  • 1
  • 26
  • 46

1 Answers1

1

You cannot make Win32 controls send notifications to the control rather than its parent. That is simply how Win32 notification messages work.

What frameworks like WinForms, VCL etc. do is to arrange that parent controls reflect notification messages back to the child control.

I guess that OWL does not do this notification message reflection. If you are going to use a framework, it seldom makes sense to swim against the tide. I suggest that you would be better off following the framework standard approach.

David Heffernan
  • 572,264
  • 40
  • 974
  • 1,389