Original Post
Hi, Here's a weird issue I've been getting under VC++ 2005 Express Beta 2. I can't seem to get MessageBox() to work properly, and I think the problem only started recently. I've done it the "usual way" many times before using other compilers, but it's only now started playing up. Supposing I tried: . Here's the bizarre bit: If I try:
That is in Chinese (seems to be, anyway, I'm no expert). And no, it isn't Photoshopped or edited - that's exactly what came out of the second code snippet. So, here's my problem. I can't just do MessageBox() the way MSDN or any other online tutorial suggests (the first code snippet), because VC++ 2005 flips out. And if I follow the compiler output telling me how to fix it, it puts my program into Chinese (or something like it). Sorry, but I'm stumped. Sod's law, and my rotten luck, suggests nobody else has experienced this problem ever. Can anybody offer any information as to what the problem is? Thanks in advance, ukdeveloper.
MessageBox(NULL,"Hello","Hello",MB_OK);
I've used such examples in countless programs before. But now, I get error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [6]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast I'm including
MessageBox(NULL,(LPCWSTR)"Hello",NULL,MB_OK);
this appears: