Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How search an item in a ListCtrl like the Index of MSDN ???

Posted on 1999-07-22
6
Medium Priority
?
348 Views
Last Modified: 2010-08-05
I have made a MultiColumnComboBox with a combobox and a ListCtrl.
I would like to search item in my ListCtrl by sequence of one keys of my keyboard like the Index Search in MSDN.
I think i must use OnEditChange from My combobox to intercept the keydown character and after ...

Sorry for bad english.
Thanks a lot.
Pierre.
0
Comment
Question by:Mestrez
[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
  • 4
6 Comments
 
LVL 3

Expert Comment

by:Shay050799
ID: 1200805
you have to be more specific
0
 
LVL 3

Accepted Solution

by:
Laminamia063099 earned 150 total points
ID: 1200806
You are on the write track.  Capture the character messages with WM_CHAR and store them into a string.  Use the CB_FINDSTRING message to find a string that starts with the characters that you've caught so far.  Then use the CB_SETCURSEL message to scroll the box to and select the item whose first letters match the letters captured so far.
0
 
LVL 3

Expert Comment

by:Laminamia063099
ID: 1200807
If you have any more questions, please ask!

Laminamia :)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Expert Comment

by:Laminamia063099
ID: 1200808
Sorry my answer is in Win32 API.  When you capture the OnEditChange, get the string that has been input so far, and search the combo box with the CB_FINDSTRING message.  It will search for a string that has the first matching characters as what the user has entered so far.  CB_FINDSTRINGEXACT will find a string that matches perfectly.  Both messages will return the index of the item in the list box.  CB_ERR will be returned if no string has the first matching characters with what the user has entered.  CB_SETCURSEL will scroll the index into view (in this case, send the index returned by CB_FINDSTRING) and select it.  

Laminamia :)
0
 

Author Comment

by:Mestrez
ID: 1200809
Thanks a lot.

To chat -> mestrez.pierre@usa.net
0
 
LVL 3

Expert Comment

by:Laminamia063099
ID: 1200810
What language do you speak, Mestrez?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

704 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