The question is completely unrelated to Code::Blocks, and even wxWidgets. Do not be surprised if this thread gets locked or removed.
The C# feature that you are trying to use does not work in C++.
Someone already suggested Google to look for an answer. I will help you with what to search for: "switch on strings in c++". For your next C++ and/or wxWidgets related question, please use a proper forum.
Once again, your question has nothing to do with Code::Blocks, therefore violating the forum rules.