Solved

Deselection in CTreeCtrl

Posted on 1998-05-06
1
1,811 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
post4 challenge 28 104
Modbus - whats the maximum I can store in one register? 4 80
Change to event 1 117
Problem to App source 6 70
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

809 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