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
0 OriginalGriff 220
1 ProgramFOX 120
2 Richard MacCutchan 100
3 kbrandwijk 90
4 ChauhanAjay 80
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100