Starting out Win32 API

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;
}


I'm starting to learn how to program into GUI.
I'm trying to compile this code, however it is not working.

Here are the error that I have encountered:

Error	1	error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [22]' to 'LPCWSTR'  6


Use the TEXT macro for the strings.
I don't know what that is...
... TEXT("String");

...
Ah, okay thanks :)
Topic archived. No new replies allowed.