Sure.
If you compile from commandline:#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// cl -Zl -GS- TestMinWin1.c
//#pragma comment(linker, "-nodefaultlib") // use cl /Zl omit default library name in .OBJ
#pragma comment(lib, "kernel32.lib")
#pragma comment(lib, "user32.lib")
#pragma comment(linker, "-subsystem:windows -entry:myMain")
void __cdecl myMain(void)
{
MessageBox(NULL,"Win Computer", "Ok", MB_OK);
ExitProcess(0);
}
Support file for console program using OS msvcrt.dll// msvcrt_main.c
#pragma comment(lib, "msvcrtXP.lib")
#ifdef _WIN64
#pragma comment(linker,"/subsystem:console,5.2")
else
#pragma comment(linker,"/subsystem:console,5.1")
#endif
void __cdecl mainCRTStartup(void)
{
int __cdecl main(int argc, char **argv);
__declspec(dllimport) int __cdecl __getmainargs(int*, char***, char***, int, void*);
__declspec(dllimport) void __cdecl exit(int status);
int argc;
char** argv;
char** env;
int sinfo = 0;
__getmainargs(&argc,&argv,&env,0,&sinfo);
exit(main(argc,argv));
}