0

Having got the old program to work (more or less) as a Console application I have now turned my attention to making it work as a 'proper' program.
My first attempt was to generate the 'Hello World' string as a message box.
I found I had to cast the second and third message strings as type LPCWSTR to get the program to compile. Again using Visual C++ 2010 Express
A message box has come up, but it is not in English. It looks more like Japanese!! See the attachment for the resulting box.
The code reads

MessageBox(NULL, (LPCWSTR)"Hello World", (LPCWSTR)"Note", MB_OK);

Just what is going on?

Attachments vc1.jpg 12.49 KB
2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by normanallen
0

Not sure if this will work, but try

(LPCWSTR)L"Hello World"

just in case. If it doesn't I will look into this in detail. I remember having the same problem some years back.

Edited by WolfPack: n/a

0

That solves that problem.
Now it seems that EXpress doesn't have a Resource (.rc) editor. That makes creating and testing dialog boxes (etc.) a bit messy.
Does anyone know of another compiler that does work. I can live without MFC but it would help to be able the resources!

This topic has been dead for over six months. 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.