Example in source code:#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define _DEBUG
#ifdef _DEBUG
#include <stdio.h>
#pragma comment(linker, "-subsystem:console")
#pragma comment(linker, "-entry:WinMainCRTStartup")
#endif
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
#ifdef _DEBUG
printf("to console\n");
#endif
MessageBox(0, "Test1", "Test1", MB_OK);
return 0;
}