Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Deselection in CTreeCtrl

Posted on 1998-05-06
1
Medium Priority
?
2,041 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 160 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

810 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