You are the one, who attempts to use those 'wsprintfW' and 'MessageBox' that are not part of C++ standard, so you should read their documentation in order to know the parameters that they do take, and recursively read the description of types 'LPWSTR' and 'LPCTSTR' and how you create such variables.
JLBorges: Thanks, but still error:
main.cpp(137): error C2664: 'MessageBox' : cannot convert parameter 2 from 'char *' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
main.cpp(172): error C2664: 'MessageBox' : cannot convert parameter 2 from 'char [100]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
How to convert std::string to LPCTSTR when _UNICODE not defined? I hope is there some function for it?
keskiverto: No need to be rude. His question is not about the API itself and how to use it, but about how to call functions and get back results from them, which are both in-topic for this forums.
Even if the questions were off-topic, that's still no excuse for bad manners.
I have never seen this WinException class before... nor can I find any documentation on MSDN about it. Furthermore, WinAPI is a C library so it doesn't even have exceptions.
Is this a class you have created? Or is it part of some other library?
If you have created it, can you post it here so I can see it? If not, can you link me to some online documentation?
EDIT:
Also... Controller has a ctor? Is this GDI+ or something? =x