Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++/MFC
I met a problem in MFC, what I want to do is only when I right click the node to popup a menu to add new node and edit my tree nodes,but now even I stay one node for a while ,it still can edit node label, so what should I do to disable label edit property and when I right click nodes to enable label edit property.If anyone can help me out, I will be appreciate.
Posted 11-Dec-12 1:50am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can use the TVN_BEGINLABELEDIT notification to cancel the edit when unwanted.
 
more details at MSDN:
TVN_BEGINLABELEDIT notification code (Windows)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

set a bool variable isLabelEdit to control what time to enable and disable label edit property
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 350
1 Sergey Alexandrovich Kryukov 226
2 Shai Vashdi 220
3 OriginalGriff 183
4 Tadit Dash 135
0 Sergey Alexandrovich Kryukov 9,255
1 OriginalGriff 5,433
2 Peter Leow 4,100
3 Maciej Los 3,540
4 Abhinav S 3,333


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid