How Windows 3.11 Rendered Active Title Bars

This article examines how Microsoft Windows 3.11 rendered active window title bars under its default configuration. It covers the underlying Graphics Device Interface (GDI) rendering process, the standard 16-color VGA palette selections, typography and alignment rules, and the structural layout of the window caption controls.

Default Color Palette and Visual Styling

Under the default "Windows Default" color scheme, Windows 3.11 configured the active title bar using solid, high-contrast system colors:

  • Active Title Background (COLOR_ACTIVETITLE): Solid Navy Blue (RGB: 0, 0, 128 / #000080).
  • Active Title Text (COLOR_CAPTIONTEXT): Pure White (RGB: 255, 255, 255 / #FFFFFF).

Because standard display hardware at the time commonly operated in 16-color or 256-color VGA modes, the operating system relied on pure, non-dithered palette colors. Navy blue was one of the standard 16 VGA colors, ensuring that title bars rendered quickly and crisply without the stippling or dithering patterns that appeared when displaying unsupported intermediate shades. Unlike later iterations of Windows, Windows 3.11 did not support native color gradients across the caption bar; it was painted entirely as a flat, uniform rectangle.

Text Formatting and Font Rendering

Caption text on an active title bar in Windows 3.11 exhibited specific rendering behavior:

  • Font Selection: The title bar relied on the default Windows bitmap System font, tailored specifically to the display driver's resolution (typically 96 DPI for standard VGA or 120 DPI for 8514/A and high-resolution drivers). This font was bold, proportional, and non-antialiased.
  • Alignment: Window caption text was horizontally centered between the window controls, rather than left-aligned. If the text exceeded the available horizontal space, Windows clipped the text at the inner boundaries of the flanking control buttons.

Layout of Control Elements

The active title bar acted as a container for essential window management widgets, rendered with a pseudo-3D look achieved through highlights and shadows:

  1. System Menu Box (Left): Positioned at the far left edge was a square button containing a horizontal bar (often called the "hyphen" or "spacebar" icon). Clicking this opened the standard window control menu (Restore, Move, Size, Minimize, Maximize, Close).
  2. Minimize and Maximize Buttons (Right): Positioned at the far right were two distinct buttons containing simple vector-like triangular glyphs: a downward-pointing triangle for minimizing and an upward-pointing triangle for maximizing. When a window was maximized, the maximize button was replaced by a restore button showing both up and down arrows.

These buttons used the standard 3D button face gray (COLOR_BTNFACE, RGB: 192, 192, 192) with 1-pixel white top/left borders for highlights and dark gray/black bottom/right borders to generate depth.

The Rendering Pipeline

The rendering of the title bar was managed during the non-client area painting phase:

  1. Message Dispatch: The window manager (USER.EXE) sent a WM_NCPAINT (Non-Client Paint) message to the target window.
  2. Device Context Creation: Windows acquired a non-client Device Context (DC) via GetWindowDC, allowing drawing anywhere inside the window frame rather than just the client canvas.
  3. Background Painting: The Graphics Device Interface (GDI.EXE) filled the rectangular title bar region using a solid brush mapped to COLOR_ACTIVETITLE.
  4. Text Output: The GDI calculated the text dimensions using GetTextExtentPoint, established the background mode as transparent (SetBkMode(hDC, TRANSPARENT)), applied the white text color, and positioned the string in the horizontal center using ExtTextOut or DrawText.
  5. Button Assembly: The system menu and sizing buttons were drawn as separate frame controls inside their reserved coordinates on the left and right flanks, completing the active title bar presentation.