Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TTreeView and WndProc

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi all.
I want to be able to control TTreeView.WndProc without creating a subclass to TTreeView.

The WndProc procedure is protected in the TTreeView class, and therefore I cannot assign the WndProc to a customWndProc procedure like this:

TreeView1.WndProc := MyCustomWndProc;

How do I take control over the WndProc procedure.




[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
Make a "hacked" class where wndproc resides in public
call it "THackedTreeView"

and then you can do
THackedTreeView(TreeView1).Wndproc := MyCustomWndProc;


Cheers,
Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top