Gui Programming with WTL Course

GUI Programming with WTL: Windows Template Library Course in C++

Build native Windows GUI applications in C++ with the Windows Template Library (WTL): menus, toolbars, dialogs, GDI drawing, views and fast virtual list views, taught by Pavel Yosifovich.

79 Lessons
Lifetime access

$99

blue depth
Trusted by 10K+ students and companies
Sentinel one logo white
microsoft logo white
google logo white
mandiant logo white
intel logo white
cisco white logo tr
citibank logo white
alfa bank logo white
malwarebytes logo white
proofpoint logo white
epam logo white
Sentinel one logo white
microsoft logo white
google logo white
mandiant logo white
intel logo white
cisco white logo tr
citibank logo white
alfa bank logo white
malwarebytes logo white
proofpoint logo white
epam logo white

12+ hours

on-demand video

59

video lessons

4 apps

built along the way

WTL 10

Visual Studio 2022

12 CPE

CEU credits, self-reported

Certification

Certificate and Credly badge

What is WTL, and why build Windows GUI apps with it?

The Windows Template Library (WTL) is a lightweight, header-only C++ template library that extends ATL and wraps the Windows API. It adds command bars, tab views, splitter windows and double-buffered painting, has no runtime dependencies and no garbage collection, and lets you drop to the native API at any point. It is Windows only, and it is how many fast, native Windows tools are built.

Pavel Yosifovich, co-author of Windows Internals and the author of tools such as Total Registry, Total PE and System Explorer, which he builds with WTL, teaches it the practical way: install WTL 10 and its wizard in Visual Studio 2022, understand message maps and the UI thread, then build real applications from the first window to a Task Manager style process list.

Pavel Yosifovich
Pavel Yosifovich
Developer, trainer, author and (sometimes) speaker. Co-founder of TrainSec academy.

Pavel has been working at the lowest levels of Windows for more than 25 years, as a developer, consultant, trainer, author and speaker, and is a Microsoft MVP. He is the co-author of “Windows Internals, 7th Edition, Part 1” (Microsoft Press) and the author of “Windows Kernel Programming”, “Windows 10 System Programming” and “Windows Native API Programming”.

In this course he shows the processor mechanisms that Windows is built on, the same ones he explains in Windows Internals, and checks each of them live in the kernel debugger.

What will you learn in this WTL course?

Who is this WTL course for?

  • C++ developers who have written command line tools and now want menus, toolbars, dialogs, list views and graphics in a native Windows application
  • Developers who want a light alternative to MFC: no runtime dependencies, no garbage collection, and the option to drop to the raw Windows API at any point
  • Tool authors who want to build utilities like Process Explorer style viewers, with sortable, color coded, fast virtual list views and tree views
  • Developers maintaining existing WTL or ATL based code who want to understand message maps, routing, chaining and the wizard generated structure
  • Students of the Windows System Programming series who want to put a real user interface on their tools

Roles this course prepares you for: native C++ Windows desktop developer, Windows tools developer, developer maintaining WTL, ATL or MFC applications, security or system tool developer building GUIs.

What do you need before you start?

  • Solid C++: classes, inheritance and templates. Lessons also use std::vector, std::unordered_map, std::sort and lambdas.
  • Some familiarity with the Windows API; Windows System Programming 1 is enough background. The course explains windows, message queues and UI threads itself.
  • Visual Studio 2022 or newer with WTL 10. The course shows how to install WTL and its wizard, and supplies a fixed wizard setup file. It also works on a Mac with Parallels (Windows on ARM).

What will you build in this WTL course?

Each module builds on a real application, so you end with working code for the patterns you will reuse in your own tools.

Which applications do you build?

SimpleDraw, a freehand drawing application with colors, pen width, a properties dialog and save and load; Shapes demos with GDI and GDI+; MDI and tabbed text editors with a splitter and tree view; and a Task Manager style process list with a virtual list view, icons, column sorting and colored rows.

How does WTL compare with MFC, Qt and WPF?

The first module surveys the options for Windows user interfaces: the raw Windows API, MFC, Qt and wxWidgets on the C++ side, and WinForms, WPF, UWP, WinUI and others on the .NET side. WTL sits closest to the API: thinner than MFC, no runtime dependencies and no garbage collection, which is why it suits small, fast native tools.

What does each WTL module cover?

Introduction

Course introduction: what WTL is for, prerequisites (C++, Visual Studio, basic Windows API), sample WTL tools by the instructor, and the planned nine-module outline.

Module 1: Introduction to WTL

Introduces WTL: a survey of Windows UI libraries (Windows API, MFC, Qt, wxWidgets, WinForms, WPF, UWP, WinUI), what WTL is, installing the wizard, getting headers through NuGet or vcpkg, and a long walkthrough of the wizard-generated SDI application covering WinMain, CMainFrame, message maps, the view, dialogs and resources.

Module 2: WTL Basics

WTL and Windows UI basics: threads, windows and message queues, common types and their WTL wrappers (CWindow, CDC, CRect, CPen and others), window relationships, control wrappers, message maps and command handler macros. Built around the SimpleDraw freehand drawing app covering mouse messages, repainting, menu commands and pen-reuse optimization.

Module 3: Command, Tool, and Status Bars

Command bars, toolbars and status bars: the wizard-generated command bar, rebar and toolbar code, updating menu and toolbar state with CAutoUpdateUI, status bar help strings and multi-pane status bars, and building command bars and toolbars from icon resources and image lists instead of the default bitmap.

Module 4: Handling Messages

Module 4 covers handling messages in WTL: message maps and their macros for window, command and notify messages, customizing routing with chained and alternate message maps and custom macros, and type-safe message crackers. The running SimpleDraw app is refactored so the view handles color and clear commands and updates the menu radio state.

Module 5: Drawing

Module 5 covers drawing with GDI through WTL: device context wrapper classes (CDC, CPaintDC, CClientDC, CMemoryDC), pens, brushes, fonts, text and GDI object leaks, then WM_ERASEBKGND and WM_PAINT customization. It ends with using GDI+ alongside GDI in a WTL app.

Module 6: Views

Module 6 covers frames versus views and the WTL view types: control-based edit views in an MDI app, CTabView tab interfaces, context menus for views and tabs, and splitter windows with a tree view. It shows how to route WM_COMMAND to the active view and to keep tabs and tree items in sync.

Module 7: Dialog Boxes

Covers dialog boxes in WTL using the SimpleDraw app: message boxes with AtlMessageBox, modal dialogs built from resource templates with CDialogImpl and DoModal, data exchange between members and controls, validation, combo boxes, and common dialogs (color and file open/save) with binary save/load. Also covers modeless dialogs with CFindReplaceDialog and IsDialogMessage, and resizable dialogs with CDynamicDialogLayout.

Module 8: List View and Tree View

Covers the list view and tree view controls. Builds a Task Manager style app that lists processes in a report-mode list view with icons from an icon cache, then converts it to a virtual list view (LVS_OWNERDATA, LVN_GETDISPINFO) with timer refresh and sorting. Also covers NM_CUSTOMDRAW row coloring and a short conceptual overview of the tree view.

WTL course: frequently asked questions

What is WTL?

The Windows Template Library: a lightweight, header-only C++ template library that extends ATL and wraps the Windows API for building native Windows GUI applications, with no runtime dependencies.

What do I need to know before starting?

Solid C++ including classes, inheritance and templates, plus some familiarity with the Windows API. The course explains windows, message queues and the WTL concepts from scratch.

What do I need to install?

Visual Studio (the demos use Visual Studio 2022) and WTL 10. The course shows how to install the WTL wizard, supplies a modified setup file because the stock one does not detect Visual Studio 2022, and shows how to get the headers through NuGet or vcpkg.

Why WTL and not MFC, Qt or WPF?

The first module compares the options. WTL is a thin, header only C++ layer over the Windows API with no runtime dependencies and no garbage collection, and you can drop to the native API at any time. It is Windows only.

What will I build?

A drawing application with menus, toolbars, dialogs and save and load, shape drawing demos with GDI and GDI+, tabbed and MDI editors with splitters and a tree view, and a Task Manager style process list with icons, sorting and colored rows.

Are there labs?

There is a written toolbar and status bar lab in Module 3, and each module has a source ZIP with the finished code. Several lessons end with a small suggested exercise.

Does it cover graphics beyond GDI?

One lesson shows GDI+ alongside GDI. Direct2D, Direct3D, OpenGL and Skia are mentioned as alternatives but not taught.

Is it live or pre-recorded?

Pre-recorded, watched at your own pace.

Is there a certificate?

Yes, a certificate of completion and a Credly badge, issued once you mark every lesson complete with the Complete button in the player.

What does it cost? Is there a payment plan?

$99, single payment. There is no payment plan for this course.

Can I get a refund?

Pre-recorded courses can be refunded up to 14 days after purchase, back to the original payment method. Email [email protected] to request one.

How long does it take?

59 video lessons, about 12 hours of video, plus slides and source code for every module. Coding along with the demos roughly doubles that.

Can I watch some lessons before I buy?

Yes. The Introduction, UI Libraries for Windows, What is WTL and one SimpleDraw lesson are free previews on the course page of the learning platform.

Does it earn CPE credits?

Yes, 12 CPE/CEU credits, which you self-report to your certification body with your certificate.

What should I take next?

COM Programming 1 goes deeper into ATL and COM, and Windows System Programming 1 covers the Windows API below the GUI.

Pavel Yosifovich
Pavel Yosifovich
Developer, trainer, author and (sometimes) speaker. Co-founder of TrainSec academy.

Pavel has been working at the lowest levels of Windows for more than 25 years, as a developer, consultant, trainer, author and speaker, and is a Microsoft MVP. He is the co-author of “Windows Internals, 7th Edition, Part 1” (Microsoft Press) and the author of “Windows Kernel Programming”, “Windows 10 System Programming” and “Windows Native API Programming”.

In this course he shows the processor mechanisms that Windows is built on, the same ones he explains in Windows Internals, and checks each of them live in the kernel debugger.

Gui Programming with WTL Course
GUI Programming with WTL

Build fast, native Windows GUI applications in C++ with the Windows Template Library, taught by Pavel Yosifovich.