String being displayed as asian characters

~ This may or may not be a compiler-specific problem; I think it is though, so can anyone who is familiar with Microsoft Visual C++ Express 2008 help me out?

I'm following this Windows API tutorial from winprog.org, and the first code it asks you to compile as a test is:

1
2
3
4
5
6
7
8
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
    LPSTR lpCmdLine, int nCmdShow)
{
    MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
    return 0;
}


It says that you must set your compiler to compile as C (instead of C++), which I did. When I tried to compile as C++ I got all sorts of errors.

Now when compiled as C, it runs fine. The dialog box shows up, but the strings for the message and caption are shown in weird Asian characters.

What am I doing wrong? Thanks.
Actually I just solved the problem myself. In Visual C++ Express 2008, Under Project Options > Configuration Options > General, I had to select
Use Multi-Byte Character Set
instead of
Use Unicode Character Set
.
Last edited on
Please don't double post again- OK?
Kay
Topic archived. No new replies allowed.