MSDN Docs - Windows Programming

Welcome to Windows Programming

This guide will walk you through the essentials needed to start developing native Windows applications using the Win32 API, C++/WinRT, and the Windows App SDK.

Prerequisites

Creating Your First Project

Follow the steps below to create a simple "Hello, World!" Win32 application.

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    MessageBox(NULL, L"Hello, Windows!", L"Welcome", MB_OK);
    return 0;
}

Build and Run

  1. Open Visual Studio → File > New > Project
  2. Select Desktop Development with C++Empty Project
  3. Replace the generated main.cpp content with the code above.
  4. Build (Ctrl+Shift+B) and start debugging (F5).

Next Steps