Solved

Deselection in CTreeCtrl

Posted on 1998-05-06
1
1,761 Views
Last Modified: 2013-11-20
1.How can I deselect an item in CTreeCtrl?
SetItemState(nItem,0,TVIS_SELECTED) leaves item selected though not hilighted but with label surrounded by focus box. How can I fix this? Also I don't get TVN_SELCHANGED notification.
2. After creating CTreeCtrl with TVS_SHOWSELALWAYS selected item does not remain selected when the tree-view control loses focus. What can be the problem?
0
Comment
Question by:tflex
1 Comment
 
LVL 2

Accepted Solution

by:
connex earned 80 total points
ID: 1307953
Hi!

1. Simply use
       SelectItem(NULL)
   This will deselect the currently selected Item and remove
   the focusbox too.

2. Hmm, this works fine with the applications I wrote so far.
   Have you changed anything vital or maybe handle the
   NM_KILLFOCUS incorrectly?

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
NotAlone Challenge 20 79
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 184
Annoying "thing" blocks my view 4 80
firstChar challenge 13 106
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now