Click here to Skip to main content
15,911,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Handling Stack Overflow Pin
Zac Howland27-Sep-06 11:00
Zac Howland27-Sep-06 11:00 
GeneralRe: Handling Stack Overflow Pin
risingtechie27-Sep-06 11:23
risingtechie27-Sep-06 11:23 
GeneralRe: Handling Stack Overflow Pin
Christian Graus27-Sep-06 11:26
protectorChristian Graus27-Sep-06 11:26 
GeneralRe: Handling Stack Overflow Pin
Zac Howland27-Sep-06 11:31
Zac Howland27-Sep-06 11:31 
AnswerRe: Handling Stack Overflow Pin
Stephen Hewitt27-Sep-06 14:12
Stephen Hewitt27-Sep-06 14:12 
AnswerRe: Handling Stack Overflow Pin
Shog927-Sep-06 19:03
sitebuilderShog927-Sep-06 19:03 
AnswerRe: Handling Stack Overflow Pin
ShilpiP27-Sep-06 20:03
ShilpiP27-Sep-06 20:03 
QuestionFast keyword Search through CSortedArray?? anyone? Pin
Greg Ellis27-Sep-06 9:50
Greg Ellis27-Sep-06 9:50 
Hi There,

I have a virtual listview that I load up anywhere from 20,000 to 200,000 records into. The virtual listview handles this no problem at all. I am using the CSortedArray by PJ Naughter class to store a array of custom objects. I can sort the array very fast no problems.

My issue occurs when I have to do a keyword search. I have to be able to allow the user to search as they type into a text box. So the user starts off with a FULL list of ALL the items appearing in the virtual listview, as the type keys into the textbox the virtual listview starts drilling down and only showing items that have the letters being typed in the name. so simple example:

List
====
Greg
John
Steve
George

If the user types G in the text box the list will now look like below

List
====
Greg
George


I have this working using a simple for loop to loop through all the items at each keystroke and remove any items from the list that do not match the keys typed. However, when my list gets to 30,000 or higher the search begins to take up WAY too much CPU. Is there some faster way I can do search like this using the CSortedArry?

Thanks
Greg
AnswerRe: Fast keyword Search through CSortedArray?? anyone? Pin
David Leyva27-Sep-06 10:06
David Leyva27-Sep-06 10:06 
GeneralRe: Fast keyword Search through CSortedArray?? anyone? Pin
Greg Ellis27-Sep-06 10:15
Greg Ellis27-Sep-06 10:15 
GeneralRe: Fast keyword Search through CSortedArray?? anyone? Pin
Steve S27-Sep-06 21:49
Steve S27-Sep-06 21:49 
AnswerRe: Fast keyword Search through CSortedArray?? anyone? Pin
Zac Howland27-Sep-06 10:20
Zac Howland27-Sep-06 10:20 
AnswerRe: Fast keyword Search through CSortedArray?? anyone? Pin
Waldermort27-Sep-06 15:18
Waldermort27-Sep-06 15:18 
AnswerRe: Fast keyword Search through CSortedArray?? anyone? Pin
Stephen Hewitt27-Sep-06 20:40
Stephen Hewitt27-Sep-06 20:40 
QuestionClearing the edit box in ccombobox Pin
lctrncs27-Sep-06 9:30
lctrncs27-Sep-06 9:30 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow27-Sep-06 10:48
David Crow27-Sep-06 10:48 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs27-Sep-06 11:38
lctrncs27-Sep-06 11:38 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 2:44
David Crow28-Sep-06 2:44 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs27-Sep-06 11:42
lctrncs27-Sep-06 11:42 
GeneralRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 2:46
David Crow28-Sep-06 2:46 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 3:54
lctrncs28-Sep-06 3:54 
GeneralRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 4:07
David Crow28-Sep-06 4:07 
GeneralRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 7:10
lctrncs28-Sep-06 7:10 
QuestionRe: Clearing the edit box in ccombobox Pin
David Crow28-Sep-06 7:44
David Crow28-Sep-06 7:44 
AnswerRe: Clearing the edit box in ccombobox Pin
lctrncs28-Sep-06 10:15
lctrncs28-Sep-06 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.