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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preventing expansion of treeview item 1

Status
Not open for further replies.

DoctorC

Programmer
Jun 29, 2000
34
0
0
US
I want to prevent users from expanding a treeview item within a dialog unless they enter a password. I know treeview controls send an ON_NOTIFY message to the parent window (in this case a dialog), but I haven't been able to figure out how to prevent that message from being handled. I tried the TVN_ITEMEXPANDING message, but apparently this is too late...it goes ahead and expands after politely handling my OnItemExpanding() function. Any ideas how I can interfere when the user clicks to expand an item? [sig][/sig]
 
Whoops, I meant to put this in the Visual C++ forum [sig][/sig]
 
Yoo can handle the message WM_NCHITTEST. It is the first message on moving, clicking, draging...
A good idea is to use the handler
OnNcHitTest( point );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top