Find a working, compilable code example of a specific Windows API call to use as a reference while building a desktop app.
Bootstrap a new Win32 application by adapting a complete sample that already handles boilerplate window creation and message loops.
Learn how a specific Windows system interface works by studying a small, focused project that exercises only that feature.
Requires Visual Studio and the Windows SDK, Visual Studio Community edition is free.
This repository is a collection of code samples from Microsoft that show how to use the Windows programming interfaces for building traditional desktop applications. These are the kind of applications that run directly on Windows as standalone programs, as opposed to web apps or the newer Universal Windows Platform (UWP) style apps. Each sample is a small, self-contained project with its own Visual Studio solution file and all the source code needed to compile and run it. The samples cover the programming models and APIs available on Windows and Windows Server. Most were written for Windows 7, Windows 8.1, or Windows Server 2012 R2 using Visual Studio 2013, though many also work on newer versions of Windows. The primary intended audience is developers who want to see working examples of specific Windows API calls. Microsoft recommends cloning the repository locally and using Visual Studio's Find in Files feature to search across all the sample code for a particular API name. This makes it easy to find a concrete example of how any given Windows function is actually used in practice. Visual Studio Community edition is free and sufficient for this purpose. The repository does not contain UWP (Universal Windows Platform) samples, those live in a separate repository. Links to related sample collections and the official Windows developer documentation are included in the README.
← microsoft on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.