Click here to Skip to main content
12,947,250 members (48,476 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
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)
Rate this: bad
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

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,059
CHill60 3,235
Maciej Los 2,538
Jochen Arndt 1,935
ppolymorphe 1,795

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2017
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