There are various alternative that are related to the character set that your project is using.
Written specifically for Unicode (UTF-16LE) -
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevious, LPWSTR lpCommandline, int nShow)
{
MessageBoxW(NULL, L"Unicode Text", L"Unicode Caption", MB_OK | MB_ICONINFORMATION);
return 0;
}
Written specifically for Non-Unicode -
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevious, LPSTR lpCommandline, int nShow)
{
MessageBoxA(NULL, "Non-Unicode Text", "Non-Unicode Caption", MB_OK | MB_ICONINFORMATION);
return 0;
}
Will build for either character set -
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <tchar.h>
int WINAPI _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevious, LPTSTR lpCommandline, int nShow)
{
MessageBox(NULL, TEXT("Build correctly for Unicode/Non-Unicode Text"), TEXT("Generic Text Caption"), MB_OK | MB_ICONINFORMATION);
return 0;
}