forked from jrsoftware/issrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Myprog.c
34 lines (29 loc) · 1.09 KB
/
Myprog.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <windows.h>
#include <commctrl.h>
#if defined(_X86_)
#define ARCHNOTE TEXT("")
#elif defined(_AMD64_)
#define ARCHNOTE TEXT("\n\n(This EXE was compiled for the x64 architecture.)")
#elif defined(_M_ARM64)
#define ARCHNOTE TEXT("\n\n(This EXE was compiled for the ARM64 architecture.)")
#elif defined(_IA64_)
#define ARCHNOTE TEXT("\n\n(This EXE was compiled for the Itanium architecture.)")
#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;
}