"Hello" window for the Win32 API

First of all, let's take a look at the Hello application from the first chapter of this book. The following code snippet is the same application written directly with the Win32 API, without Small Windows. Note that the code is written in C rather than C++ as the Win32 API is a C function library rather than a C++ class library. As you can see, the code is a lot more complicated compared to the application in the first chapter.

Do not worry if it looks complicated. Its purpose is actually to demonstrate the complexity of the Win32 API; we'll discuss the details in this and the following chapters.

MainWindow.c

#include <Windows.h> #include <Assert.h> #include <String.h> #include <TChar.h> LRESULT CALLBACK WindowProc(HWND ...

Get C++ Windows Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.