This walkthrough shows how to create a traditional Windows desktop application in Visual Studio. The example application you'll create uses the Windows API to display 'Hello, Windows desktop!' in a window. You can use the code that you develop in this walkthrough as a pattern to create other Windows desktop applications.
-->
Dev-C is the portable version of Dev-C. It has all the features that come with Dev-C, but the difference is that you can directly run it from an external device, without having to install it. The small and free application supports several languages, and you can choose one when you first launch Dev-C. Desktop Applications (Visual C); 4 minutes to read +6; In this article. A desktop application in C is a native application that can access the full set of Windows APIs and either runs in a window or in the system console. Desktop applications in C can run on Windows XP through Windows 10 (although Windows XP is no longer officially supported and there are many Windows APIs.
The Windows API (also known as the Win32 API, Windows Desktop API, and Windows Classic API) is a C-language-based framework for creating Windows applications. It has been in existence since the 1980s and has been used to create Windows applications for decades. More advanced and easier-to-program frameworks have been built on top of the Windows API. For example, MFC, ATL, the .NET frameworks. Even the most modern Windows Runtime code for UWP and Store apps written in C++/WinRT uses the Windows API underneath. For more information about the Windows API, see Windows API Index. There are many ways to create Windows applications, but the process above was the first.
Important
For the sake of brevity, some code statements are omitted in the text. The Build the code section at the end of this document shows the complete code.
Prerequisites
Create a Windows desktop project
Follow these steps to create your first Windows desktop project. As you go, you'll enter the code for a working Windows desktop application. To see the documentation for your preferred version of Visual Studio, use the Version selector control. It's found at the top of the table of contents on this page.
To create a Windows desktop project in Visual Studio 2019
Your project is now created and your source file is opened in the editor. To continue, skip ahead to Create the code.
To create a Windows desktop project in Visual Studio 2017
Your project is now created and your source file is opened in the editor. To continue, skip ahead to Create the code.
To create a Windows desktop project in Visual Studio 2015![]()
Your project is now created and your source file is opened in the editor.
Create the code
Next, you'll learn how to create the code for a Windows desktop application in Visual Studio.
To start a Windows desktop application
To add functionality to the WinMain function
Dev C++ 5.12To add functionality to the WndProc function
Build the code
As promised, here's the complete code for the working application.
To build this example
Congratulations! You've completed this walkthrough and built a traditional Windows desktop application.
Dev C Download Windows 7See alsoComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |