Click here to Skip to main content
15,903,033 members
Home / Discussions / C#
   

C#

 
QuestionCorrect marshalling? C# callback from C++ DLL Pin
ProfAndyZulu30-Jun-10 3:14
ProfAndyZulu30-Jun-10 3:14 
AnswerRe: Correct marshalling? C# callback from C++ DLL Pin
David Knechtges30-Jun-10 5:07
David Knechtges30-Jun-10 5:07 
Questionstd::map<> in C# Pin
raju_shiva30-Jun-10 1:50
raju_shiva30-Jun-10 1:50 
AnswerRe: std::map in C# Pin
Łukasz Nowakowski30-Jun-10 1:56
Łukasz Nowakowski30-Jun-10 1:56 
AnswerRe: std::map in C# Pin
Pete O'Hanlon30-Jun-10 3:00
mvePete O'Hanlon30-Jun-10 3:00 
AnswerRe: std::map in C# Pin
Laxman Auti30-Jun-10 5:25
Laxman Auti30-Jun-10 5:25 
GeneralRe: std::map in C# Pin
raju_shiva30-Jun-10 20:21
raju_shiva30-Jun-10 20:21 
GeneralRe: std::map in C# Pin
Laxman Auti30-Jun-10 22:46
Laxman Auti30-Jun-10 22:46 
raju_shiva wrote:
How can i search in map and get the results back in CCombo.


OK. then you could use HashSet with string as a type. This stores unique values and don't need to have key/value pair.
C#
//Your predefined map values.
HashSet<string> stringSet = new HashSet<string> { "abc", "aa" };

//Copy to new array for operations.
string[] stringList = new string[stringSet.Count];
stringSet.CopyTo(stringList);

//Suppose you type "a" in combo box edit.
string strValue = "a";

//Look for all the values that contains "a"
string[] matchedStrings = Array.FindAll(stringList, delegate(string p)
{
    return (p.Contains(strValue));
}

//Sort array for correct sequence in combo box.
Array.Sort(matchedStrings);

//You should access predefined combox here.
//ComboBox cmbValues = new ComboBox();

//Clear all items from combo box.
cmbValues.Items.Clear();

//Fill the combo box with selected values.
cmbValues.Items.AddRange(matchedStrings);

//default selection to 0th value.
cmbValues.SelectedIndex = 0;
});

Hope this gives some idea to you.
Knock out 't' from can't, you can if you think you can. Cool | :cool:

GeneralRe: std::map in C# Pin
raju_shiva30-Jun-10 23:18
raju_shiva30-Jun-10 23:18 
GeneralRe: std::map in C# Pin
Laxman Auti1-Jul-10 1:06
Laxman Auti1-Jul-10 1:06 
GeneralRe: std::map in C# Pin
raju_shiva1-Jul-10 1:46
raju_shiva1-Jul-10 1:46 
AnswerRe: std::map in C# [modified] Pin
Laxman Auti5-Jul-10 8:39
Laxman Auti5-Jul-10 8:39 
AnswerRe: std::map in C# [modified] Pin
Dave Doknjas30-Jun-10 11:30
Dave Doknjas30-Jun-10 11:30 
GeneralRe: std::map in C# Pin
Laxman Auti30-Jun-10 19:44
Laxman Auti30-Jun-10 19:44 
QuestionC#/OpenXML to manipulate Word files. Pin
Wolfram Steinke30-Jun-10 1:11
Wolfram Steinke30-Jun-10 1:11 
Questioncan you help me Pin
sweet_memory30-Jun-10 1:01
sweet_memory30-Jun-10 1:01 
AnswerRe: can you help me PinPopular
OriginalGriff30-Jun-10 1:14
mveOriginalGriff30-Jun-10 1:14 
AnswerRe: can you help me Pin
sweet_memory30-Jun-10 11:23
sweet_memory30-Jun-10 11:23 
GeneralRe: can you help me Pin
OriginalGriff1-Jul-10 0:53
mveOriginalGriff1-Jul-10 0:53 
AnswerRe: can you help me Pin
I Believe In GOD30-Jun-10 8:52
I Believe In GOD30-Jun-10 8:52 
AnswerRe: can you help me Pin
yu-jian30-Jun-10 18:23
yu-jian30-Jun-10 18:23 
QuestionHow to convert DataTable to MSDATASRC? Pin
vineesh v30-Jun-10 0:29
vineesh v30-Jun-10 0:29 
QuestionHow to invoke native MyFunction(MyStruct* myStructs, unsigned int nMyStructs) from C#? Pin
Chesnokov Yuriy29-Jun-10 22:39
professionalChesnokov Yuriy29-Jun-10 22:39 
AnswerRe: How to invoke native MyFunction(MyStruct* myStructs, unsigned int nMyStructs) from C#? Pin
freakyit1-Jul-10 4:50
freakyit1-Jul-10 4:50 
AnswerRe: How to invoke native MyFunction(MyStruct* myStructs, unsigned int nMyStructs) from C#? Pin
Daniel Grunwald2-Jul-10 0:24
Daniel Grunwald2-Jul-10 0:24 

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.