0

Hi!

I compile this simple "Hello world" Win32 program:

#include<windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Hello World!", "Note", MB_OK);
return 0;
}

When the program runs I get weird fonts. See attachement.

Kindly advise.

Thanks

Attachments HelloWorld.JPG 6.44 KB
3
Contributors
2
Replies
4
Views
9 Years
Discussion Span
Last Post by Ancient Dragon
0

The more recent Microsoft compilers default to UNICODE encoding for characters. I'm surprised this compiled without any warnings.

Try something like MessageBox(NULL, _TEXT("Hello World!"), _TEXT("Note"), MB_OK);

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.