Apps that start with windows

Get started with Windows 10 apps

Build apps that work on all Windows 10 devices, or enhance your existing apps with new and updated features.

Learn about Windows 10 Apps

Windows 10 and the Universal Windows Platform let you build apps that work and look great across all Windows device types, or update existing apps with modern features.

Get set up

Visual Studio Community and the Windows 10 SDK give you everything you need to build great apps – and they’re free.

Start coding

Whether you’re an experienced dev or just building your first app, get hands-on experience with the Windows 10 platform and docs.

Tutorials

Looking for a guided learning experience? These tutorials will help.

Samples

Get firsthand experience with the Windows 10 platform and see APIs in action.

What’s new

Expand your horizons and explore the latest additions to Windows 10.

Choose your Windows app platform

When you want to create a new desktop application for Windows PCs, the first decision you make is which application platform to use. Windows provides four main application platforms, each with different strengths:

  • Universal Windows Platform (UWP): This platform provides a common type system, APIs, and application model for all devices that run Windows 10. UWP applications can be native or managed.
  • WPF and Windows Forms: These .NET-based platforms provide a common type system, APIs, and application model for managed applications.
  • Win32: This is the original platform for native C/C++ Windows applications that require direct access to Windows and hardware. This makes the Win32 API the platform of choice for applications that need the highest level of performance and direct access to system hardware.

Each of these platforms include a complete UI framework and set of UI controls that let you create desktop apps like Word, Excel, and Photoshop that run in the classic Windows desktop and take full advantage of that environment’s specific features. On Windows 10, each of these platforms also support using the Windows UI Library (WinUI) to create their user interfaces.

Some of these platforms share certain traits and are better suited for specific application types. For example, both UWP and .NET have deep integration with Visual Studio. This provides many benefits, especially in the areas of developer productivity, sophisticated and customizable UI, and application security. Because these frameworks support visual designers and UI markup for rapidly creating UI, they are particularly well-suited for line-of-business applications.

No matter which app platform you choose, you can use many Windows 10 features to deliver a modern experience in your app. For example, even if your desktop app is built using WPF, Windows Forms, or the Win32 API, you can still use MSIX package deployment. For more information about all the ways to modernize your desktop apps, see Modernize your desktop apps.

UWP is the leading-edge platform for Windows 10 applications and games. It’s a highly customizable platform that uses XAML markup to separate UI (presentation) from code (business logic). UWP is suitable for desktop applications that require a sophisticated UI, styles customization, and graphics-intensive scenarios. UWP also has built-in support for the Fluent Design System for the default UX experience and provides access to the Windows Runtime (WinRT) APIs. By adopting Fluent, UWP automatically supports common input methods such as ink, touch, gamepad, keyboard, and mouse.

Читайте также:  Intel ich10r sata ahci controller windows 10

Not only can you use UWP to create desktop applications for Windows PCs, but UWP is also the only supported platform for Xbox, HoloLens, and Surface Hub applications. UWP is our newest, leading-edge application platform.

For more information about UWP, see the following articles:

WPF is the established platform for managed Windows applications with access to .NET Core or the full .NET Framework, and it also uses XAML markup to separate UI from code. This platform is designed for desktop applications that require a sophisticated UI, styles customization, and graphics-intensive scenarios. WPF development skills are similar to UWP development skills, so migration from WPF to UWP apps is easier than migration from Windows Forms.

For more information about WPF, see the following articles:

Windows Forms

Windows Forms is the original platform for managed Windows applications with a lightweight UI model and access to .NET Core or the full .NET Framework. It excels at enabling developers to quickly get started building applications, even for developers new to the platform. This is a forms-based, rapid application development platform with a large built-in collection of visual and non-visual drag-and-drop controls. Windows Forms does not use XAML, so deciding later to extend your application to UWP entails a complete re-write of your UI.

For more information about Windows Forms, see the following articles:

Win32

Using the Win32 API with C++ makes it possible to achieve the highest levels of performance and efficiency by taking more control of the target platform with unmanaged code than is possible on a managed runtime environment like WinRT and .NET. However, exercising such a level of control over your application’s execution requires greater care and attention to get right, and trades development productivity for runtime performance.

Here are a few highlights of what the Win32 API and C++ offers to enable you to build high-performance applications.

  • Hardware-level optimizations, including tight control over resource allocation, object lifetimes, data layout, alignment, byte packing, and more.
  • Access to performance-oriented instruction sets like SSE and AVX through intrinsic functions.
  • Efficient, type-safe generic programming by using templates.
  • Efficient and safe containers and algorithms.
  • DirectX, in particular Direct3D and DirectCompute (note that UWP also offers DirectX interop).

For more information, see the following articles:

Platform comparison: UWP, WPF, and Windows Forms

The following table compares various characteristics of Windows Forms, WPF, and UWP in detail.

Feature or scenario UWP WPF Windows Forms
Supported versions Windows 10 Windows 7 and later Windows 7 and later
Languages C#, C++/WinRT, C++/CX, VB, JavaScript C#, C++/CLI (Managed Extensions for C++), F#, VB C#, C++/CLI (Managed Extensions for C++), F#, VB
UI runtime Native (C++/WinRT and C++/CX) and managed (.NET Native) Managed (.NET Framework and .NET Core 3) Managed (.NET Framework and .NET Core 3)
Open source Yes (Windows UI Library only) Yes (.NET Core only) Yes (.NET Core only)
Supports XAML Yes Yes No
Strengths
  • XAML markup for UI
  • Rich and customizable UX
  • Your existing code bases are .NET Standard compliant
  • High DPI support
  • Support for multiple input types across Windows devices (including touch, pen, gamepad, mouse, and keyboard)
  • Support for Xbox, HoloLens, IoT or Surface Hub
  • Optional dense (compact) UI
  • Support for native C++
  • Optimized battery life
  • Modern accessibility support (such as screen readers)
  • Rich text data capabilities (such as built-in spell check)
  • Inking support
  • Secure execution via application containers (for example, untrusted content is sandboxed)
  • XAML markup for UI
  • Rich and customizable UX
  • Large collection of controls from Microsoft and partners
  • Dense UI
  • Support for Windows 7
  • Platform support for input validation
  • Rapid application development
  • WYSIWYG editor for building UI
  • Large collection of controls from Microsoft and partners
  • Dense UI
  • Support for Windows 7
  • Keyboard and mouse input
Scenarios that have limited support
  • Multiple window support 1
  • Platform support for input validation 1
  • Windows 7 is not supported
  • Some Windows Runtime APIs require specific minimum versions of Windows 10
  • Full platform support and shell integration (for example, UWP currently doesn’t support System Tray integration or full access to all devices)
  • Direct access to all files on disk
  • ADO.NET
  • Existing code-base class libraries that use non-.NET Standard or non-Windows App Certification Kit compliant APIs
  • Local network loopback support (that is, if your app needs to communicate with localhost without creating a loopback exemption on the target device)
  • Intensive file I/O
  • High DPI support 2
  • Touch input 2
  • High DPI support 2
  • Touch input 2
  • Customizable UI
  • Rich graphics and user experiences (such as touch and animations)
  • Rich abstraction of views and data models

1 We have publicly announced features that will address this scenario in a future release of Windows 10.

2 Although the platform lacks first-class API support for this scenario, developers can support this scenario with workarounds.

Use the Windows UI Library with Windows apps

To supplement the main Windows app platforms, you can also use the Windows UI Library (WinUI) in your apps. WinUI started as a toolkit that provides new and updated versions of WinRT controls for UWP apps that target down-level versions of Windows 10. As of WinUI 3, WinUI is growing in scope to become the premier native user interface (UI) framework for Windows 10 apps across UWP, .NET, and Win32 app platforms.

You can use WinUI in the following ways in Windows apps.

  • UWP apps can use WinUI 2.x controls in place of WinRT controls provided by the Windows SDK. These releases of WinUI include both all-new controls and updated versions of existing controls from the Windows SDK.
  • You can update existing WPF, Windows Forms, and C++/Win32 apps to host WinUI 2.x controls by using XAML Islands.
  • Starting with WinUI 3, you can create .NET and C++/Win32 apps and UWP apps that use an entirely WinUI-based UI. This release includes Visual Studio project templates that provide everything you need to create these apps.

Other app platforms

Progressive Web Apps (PWAs)

PWAs let developers package their website code so it can be installed and run like an application on Windows 10 PCs. For more information, see Progressive Web Apps.

Xamarin

Use Xamarin to build cross-platform applications for Windows 10 that can also run on iOS and Android. For more information, see Xamarin.

Get started with desktop Windows apps that use the Win32 API

The Win32 API (also called the Windows API) is the original platform for native C/C++ Windows applications that require direct access to Windows and hardware. It provides a first-class development experience without depending on a managed runtime environment like .NET and WinRT (for UWP apps for Windows 10). This makes the Win32 API the platform of choice for applications that need the highest level of performance and direct access to system hardware.

This documentation covers how to create desktop Windows apps with the Win32 API. The Win32 API is one of several app platforms you can use to build desktop Windows apps. For more info about other app platforms, see Choose your platform.

Get set up

Follow these instructions and start creating desktop apps for Windows 10 that use the Win32 API.

Download or update Visual Studio 2019. If you don’t already have Visual Studio 2019, you can install the free Microsoft Visual Studio Community 2019. When you install Visual Studio, make sure to select the Desktop development with C++ option. For download links, see our Downloads page.

When you install Visual Studio, you can optionally select the .NET desktop development and Universal Windows Platform development options for access to other project types and app platforms for building desktop Windows apps.

If you want to build your desktop app into an MSIX package and test or debug the packaged app on your development computer, you’ll need to enable Developer Mode on your computer.

For scripts you can use to set up your development computer and install other features or packages, check out this GitHub project.

Learn how to create desktop apps using the Win32 API

If you’re new to building desktop apps using the Win32 API, the following tutorials and articles will help get you started.

Topic Description
Create your first C++ Win32 app This tutorial teaches you how to write a Windows program in C++ using Win32 and COM APIs.
Create your first app using DirectX This basic tutorial will get you started with DirectX app development.
Programming Guide for 64-bit Windows Describes programming for 64-bit versions of the Windows operating system.
Using the Windows Headers Provides an overview of some of the conventions used in the Windows header files.

You can also browse the desktop app samples.

Modernize your desktop apps for Windows 10

If you have an existing desktop Win32 app, there are many features in the Universal Windows Platform (UWP) that you can use to deliver the best possible experience on Windows 10. For example, starting in Windows 10, version 1903, you can host UWP XAML controls in your desktop Win32 app using a feature called XAML Islands.

Most of these UWP features are available as modular components that you can adopt in your desktop app at your own pace without having to rewrite your entire application. You can enhance your existing desktop app by choosing which parts of Windows 10 and UWP to adopt.

C++/WinRT

Optionally, you can configure your development computer to use C++/WinRT. C++/WinRT is an entirely standard modern C++17 language projection enables you to easily consume Windows Runtime APIs Windows Runtime (WinRT) APIs from your C++ Win32 desktop application. C++/WinRT is implemented as a header-file-based library.

To configure your project for C++/WinRT:

  • For new projects, you can install the C++/WinRT Visual Studio Extension (VSIX) and use one of the C++/WinRT project templates included in that extension.
  • For existing Windows desktop application projects, you can install the Microsoft.Windows.CppWinRT NuGet package in the project.

For more details about these options, see this article.

What’s new for Win32 APIs in Windows 10

To learn about new Win32 APIs that have been introduced in Windows 10, see what’s new.

Get started with Win32 features and technologies

Win32 APIs exist for many features and technologies in Windows 10, including core user interface and windowing APIs, audio and graphics, and networking. For guidance and code samples about using these APIs, see our features and technologies index.

Читайте также:  Астра линукс или альт линукс сравнение
Оцените статью