Treeview control & multiple selection

Posted on 1997-12-31
Medium Priority
Last Modified: 2013-12-03

i've made a program that uses a treeview control to view some data and do some drag&drop with it.

but now i want to allow a user to make a multiple selection, and then do something with the selection.. BUT
i don't know how.. not a single example i have do this.
they all use a single selection. I can't even get the treeview to ALLOW a multiple selection.. ie shift-click doesn't select mote than one.

can someone help me with my problem? would be great!

Question by:TheMadManiac

Accepted Solution

GregL earned 240 total points
ID: 1409735
Here is the only answer I could find.  The Class Viewer in MSVC 5 does have a multiselection treeview, but it doesn't use the SysTreeView32 control.

Microsoft Knowledge Base

SAMPLE: How to Simulate Multiple-Selection TreeView Control

Last reviewed: February 15, 1996
Article ID: Q125587  

The information in this article applies to:
Microsoft Win32 Application Programming Interface (API) included with:

    - Microsoft Windows NT version 3.51
    - Microsoft Windows 95 version 4.0

The TVWSTATE sample demonstrates how to simulate a multiple-selection TreeView control. The Windows 95 TreeView control does not support multiple selection. If you want a multiple-selection TreeView, you can use state images to simulate it in your application.

The TVWSTATE sample accomplishes this by using a checkbox type of state image to indicate that the item is selected or cleared (de-selected). These checkboxes will retain their state even if the TreeView loses focus.

Download TVWSTATE.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

Microsoft Download Service (MSDL)

      Dial (206) 936-6735 to connect to MSDL
      Download TVWSTATE.EXE (size: 49318 bytes)
Internet (anonymous FTP)

      ftp ftp.microsoft.com
      Change to the SOFTLIB\MSLFILES directory
      Get TVWSTATE.EXE (size: 49318 bytes)


Author Comment

ID: 1409736
I thank thee,

i got it working and stuff.. the TVWSTATE.EXE also had some other nice thingies, like naming conventions etc.

Florizzzz / The Mad Maniac

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

864 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