Solved

How to get the selected items..???

Posted on 1998-03-16
3
189 Views
Last Modified: 2010-04-10
Does anyone know how to get the selected items inside a Multi-Selection CListBox???
0
Comment
Question by:softyan
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
faster earned 50 total points
Comment Utility
send a LB_GETSELCOUNT message to the listbox first, then allocate a memory according to the size returned and send message LB_GETSELITEMS, using the memory allocated as the lparam.  Check document for these two messages for detail.
0
 
LVL 2

Expert Comment

by:shogi
Comment Utility
Yes, Shogi's answer is the MFC version, the MFC function then send the messages I mentioned.  I don't like MFC, but probably you do.
0
 
LVL 7

Expert Comment

by:faster
Comment Utility
I prefer Shogi's answer! Thanks faster and Shogi.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

772 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

11 Experts available now in Live!

Get 1:1 Help Now