Solved

Deselection in CTreeCtrl

Posted on 1998-05-06
1
1,725 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

7 Experts available now in Live!

Get 1:1 Help Now