32 lines
1.0 KiB
C
Raw Permalink Normal View History

2011-10-07 14:23:34 +02:00
#include <windows.h>
#include <commctrl.h>
#if defined(_X86_)
2024-03-20 20:13:30 +01:00
#define ARCHNOTE TEXT("\n\n(This EXE was compiled for the x86 architecture.)")
2011-10-07 14:23:34 +02:00
#elif defined(_AMD64_)
#define ARCHNOTE TEXT("\n\n(This EXE was compiled for the x64 architecture.)")
2018-12-18 20:25:48 +01:00
#elif defined(_M_ARM64)
#define ARCHNOTE TEXT("\n\n(This EXE was compiled for the Arm64 architecture.)")
2011-10-07 14:23:34 +02:00
#else
#error unknown arch
#endif
int WinMainCRTStartup(void)
{
// Work around bug in Windows XP Gold & SP1: If the application manifest
// specifies COMCTL32.DLL version 6.0 (to enable visual styles), we must
// call InitCommonControls() to ensure that we actually link to
// COMCTL32.DLL, otherwise calls to MessageBox() fail. (XP SP2 appears
// to fix this.)
InitCommonControls();
MessageBox(NULL, TEXT("Welcome to My Program.") ARCHNOTE,
TEXT("Hello"), MB_OK);
MessageBox(NULL, TEXT("Thank you for using My Program.\n\n")
TEXT("(You can uninstall this by going to Add/Remove Programs in Control Panel.)"),
TEXT("Goodbye"), MB_OK);
ExitProcess(0);
return 0;
}