Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Technique:Identifying Windows GUI frameworks

From ReverseEngineering.wiki
Technique
Platforms Platform:Windows
On this wiki Facts · Code · Notes · Topics

How to tell which GUI framework a Windows desktop program uses (MFC, ATL/WTL, wxWidgets, Qt, VCL, plain Win32) from imports, RTTI names, strings and resources, and how each one dispatches messages to handlers.

Quick triage

Clue Framework Where handlers are
imports mfcNN.dll by ordinal, or CWinApp/CWnd RTTI Library:MFC AFX_MSGMAP data tables per class
CWindowImpl/CDialogImpl RTTI, AtlAxWin string, atl.dll Library:ATL, Library:WTL compiled ProcessWindowMessage function per class
wxWidgets x.y.z string, wxmsw*.dll, wxApp RTTI Library:wxWidgets wxEventTableEntry arrays, or Bind() calls
Qt5Core.dll/Qt6*.dll, QObject Qt moc tables, see Technique:Recovering C++ class metadata
TPF0 in RCDATA, Borland/Embarcadero strings Delphi VCL form streams in RCDATA
none of the above, RegisterClass and DialogBoxParam plain Win32 WndProc/DlgProc switch statements

Resources first

Whatever the framework, many Win32 programs keep dialogs, menus and accelerators in the resource tree (Format:PE (Portable Executable)/Resource directory): Format:Windows dialog template resource (RT_DIALOG), Format:Windows menu resource (RT_MENU), Format:Windows accelerator table resource (RT_ACCELERATOR). The control ids and command ids you read there are the keys to find handlers: in MFC as nID fields in message map entries, in ATL as compare constants in ProcessWindowMessage, in plain Win32 as case values under WM_COMMAND (0x111).

Workflow

  1. Imports and strings (above) to pick the framework; the Rich header and the runtime DLL name date the compiler (Format:PE (Portable Executable)/Rich header).
  2. Apply library function signatures (FLIRT/Function ID, Technique:Library function recognition) to name the framework code in static builds.
  3. Recover class names (Technique:Recovering C++ class metadata) and find the application object.
  4. List handlers through the framework's tables, then name them from menu/dialog resources.