Recently, I stumbled across a peculiar error that I found nothing about on the web. Although I got rid of it, I didn’t figure out what the problem was. This post is merely the story of what happened. I am working on a project that contains both C++ and C# projects. The C++ ones used…
Category: MFC
Using Microsoft Edge in a native Windows desktop app – part 6
The WebView2 control supports different printing scenarios. In this new article, I’ll show you how to display a print dialog and, respectively, how to print to PDF.
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 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.
My open-source projects are moved to GitHub
I used to have several open-source projects available on CodePlex. At the end of 2017, the site was put in read-only mode and it will probably be closed at some point. Therefore, I have decided to move the projects that could still be useful to GitHub.
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…
Dynamic Dialog Layout for MFC in Visual C++ 2015
In Visual Studio 2015 MFC comes with a new features (something that has rarely happen in recent years): support for dynamic dialog layout. That means library support for moving and resizing controls on a dialog. In this article I will show how this feature works. Suppose we have the following dialog: What we want is…
Microsoft made C++ a second-class citizen in Visual Studio 2015
Visual Studio 2015 is out and comes with lots of new features and improvements (see details here) but it also surprised me with what I call a demoting of C++ again to a second-class citizen, after some years when it looked like it regained importance at Microsoft. I’m saying Microsoft has demoted C++ because they…