Solved

Deselection in CTreeCtrl

Posted on 1998-05-06
1
1,837 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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

Suggested Solutions

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 …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 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