intermediate

USER & GDI objects

Windows, menus, cursors, device contexts, fonts, bitmaps, and the resource model behind the GUI.

Guided paths in this branch

Follow a short sequence step by step. Each path links to the first topic; use Read next on each page to continue.

Official Microsoft docs

Closest official references related to this topic on Microsoft Learn.

Why it matters

When GUI apps leak USER or GDI objects, the symptoms can look mysterious. Understanding these objects explains rendering failures, missing controls, and strange desktop instability.

Mental model

USER objects represent interface elements and interaction state; GDI objects represent drawing resources and surfaces.

How it works

  1. 1Applications create USER objects such as windows, menus, hooks, and cursors.
  2. 2They also create GDI objects such as fonts, brushes, bitmaps, and device contexts for drawing.
  3. 3Windows enforces per-process and per-session limits so one app does not exhaust all GUI resources.

Key terms

USER object
A GUI resource such as a window, menu, cursor, or desktop.
GDI object
A graphics resource such as a brush, font, bitmap, or device context.

An app that stops painting correctly after long uptime

A leak of GDI or USER handles can gradually consume the GUI resource budget until new windows, menus, or drawing resources stop being created.

Common misconception

GUI failures are not always 'video driver issues'. Many are simply object leaks or resource exhaustion inside a process or session.

You should read next

Ranked from your current topic, related links, branch depth, and any active guided path.

Related topics