Using Microsoft Edge in a native Windows desktop app – part 5

This article is a new installment in the series about using the Webview2 control in a native application. In this post, I will show how to execute a JavaScript script. Articles in this series: Part 1: Introduction to Edge and WebView2 Part 2: Creating a WebView2 component Part 3: Navigation and other events Part 4:…

How to build high DPI aware native Windows desktop applications

If you’re developing native applications for Windows using Win32 or MFC and you want to support high DPIs so that the application looks crisp on any display, you have to do a lot of things by hand. That is because the technologies for building native UIs, that is MFC, GDI, GDI+, do not provide DPI scaling support. In this article, I will walk through some of the problems of supporting DPI scaling and the solutions for them.

Using Microsoft Edge in a native Windows desktop app – part 4

In the previous articles, we learned how to perform navigation in a Windows desktop application and how navigation events work. However, until recently, it was not possible to perform POST or GET request using custom headers or content. This feature was added in version 705.50. In this fourth article of the series, we will look in detail at how to perform POST requests with custom headers and content.

Using Microsoft Edge in a native Windows desktop app – part 2

In the second part of this series, we will see how to use the WebView2 control in a C++ Windows desktop application. We will use a single document interface MFC application that features a toolbar where you can specify an address to navigate to and buttons to navigate back and forward as well as reloading the current page or stopping navigation.

Using Microsoft Edge in a native Windows desktop app – part 1

Earlier this month, Microsoft has released the new version of its Edge browser, based on the Chromium project. The new browser works on Windows 10, Windows 8.x, and Windows 7, as well as macOS, iOS, and Android. If your application display web content, you can use the new Edge browser as the rendering engine. This is made possible through the Microsoft Edge WebView2 control, currently in developer preview. In this series, I will show how you can do this in a C++ Windows desktop application.

Troubles with Windows SDK

I recently installed a fresh copy of Visual Studio 2017 on a new machine and went on to build several projects some of them being VC++. The trouble was that I immediately run into a problem (actually the first problem was that MFC & ATL were missing because I forgot to check that in the list of Individual components so I had to install them separately). The problem was an error with a missing new.h header:

1>c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.15.26726\atlmfc\include\afx.h(62): fatal error C1083: Cannot open include file: 'new.h': No such file or directory

Version history of VC++, MFC and ATL

I have tried to assemble together information about the Visual C++ releases, the compiler and the frameworks (MFC and ATL). You can find these on many places, but it is often incomplete or focused on something particular (Visual Studio, C++ compiler, framework, etc.). The table below is the result of this effort. It is incomplete…