The 90s Developer Starter Pack
I&#x27;m not a Windows programmer to a significant degree. But, I did a tiny bit of digging and discovered at WinMain is just a function called by main() in Win32 executables.  The implicit main() is pretty trivial and WinMain is largely unnecessary.<p>hInstance can be retrieved from GetModuleHandle(nullptr). hPrevInstance is always NULL. lpCmdLine can be retrieved from GetCommandLine(). nCmdShow can be retrieved from GetStartupInfo() StartupInfo.wShowWindow.<p>And, so you can just do<p><pre><code>    #include &lt;Windows.h&gt;
    #pragma comment(lib, &quot;user32.lib&quot;)
    #pragma comment(linker, &quot;&#x2F;subsystem:windows &#x2F;ENTRY:mainCRTStartup&quot;)
    int main(int argc, const char *argv[]) {
      MessageBox(NULL, &quot;Hello, Welcome to Win32 Programming&quot;, 
      &quot;Hello, World&quot;, MB_OK | MB_ICONINFORMATION);
    }
</code></pre>
and it works the same as the code in the article.  Not a significant difference. But, I like peeling back magic code to make things just a little simpler.<p>Can someone who knows better tell me why this is a bad idea? Or, is WinMain just an idea from 30 years ago that didn&#x27;t actually go anywhere?