Windows still supports non-rectangular windows through its core Win32 API. Developers can create elliptical shapes, bitmap-defined borders, or even animated mascots without frameworks. Yet these features vanished from mainstream apps. Modern UIs default to bland rectangles built on Electron, React Native for Windows, or Tauri—web wrappers that prioritize cross-platform ease over performance and control.
This shift matters because it trades efficiency for convenience. Take Notepad: Microsoft’s UWP version idles at around 50MB RAM. A pure Win32 C equivalent uses just 1.8MB. On a fresh Intel Core Ultra 9 285K with 32GB RAM running Windows 11 24H2, idle memory hits 77%—about 25GB—before launching apps. Electron-based tools like VS Code or Discord exacerbate this, each pulling 200-500MB. Cumulative bloat slows systems, shortens battery life on laptops, and strains servers in VDI setups.
Win32’s Message-Driven Core
Win32 doesn’t use an owned update loop like games or browsers. It relies on a message pump. Windows dispatches events—mouse moves, key presses, resizes—to your app’s window procedure.
while (GetMessage(&msg, NULL, 0, 0) > 0) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Your WndProc handles these via a switch on msg.message. This event model scales efficiently: no polling, minimal CPU. Frameworks abstract it away, adding layers that poll JavaScript runtimes and render via Chromium—hence the bloat.
Shaping Windows Beyond Rectangles
Custom shapes start with CreateWindowEx and flags like WS_EX_LAYERED for per-pixel alpha or SetWindowRgn for region-based clipping. Regions derive from paths, bitmaps, or primitives.
For an elliptical window, create an elliptic region:
HRGN hRgn = CreateEllipticRgn(0, 0, 200, 100);
SetWindowRgn(hwnd, hRgn, TRUE);
DeleteObject(hRgn);
Bitmap shapes use CreateBitmapRgn or PathToRegion after filling a device context. Animate by invalidating regions or using timers for WM_TIMER. Windows XP-era apps exploited this: Winamp mimicked audio gear, Windows Media Player warped into futuristic consoles, BonziBuddy roamed as a purple gorilla.
These weren’t just eye candy. Non-rectangular UIs signaled unique identity—media players as “hardware,” utilities as dashboards. Usability took hits (e.g., awkward resizing), but they stood out in a sea of defaults.
Why Custom Shapes Faded—and Why Revive Them
Blame high-level frameworks. WPF, UWP, WinUI 3 enforce composed windows with acrylic blurs and rounded corners. Web tech dominates because it ports to macOS/Linux with less rewrite. Developers avoid Win32’s “messy” C/C++ boilerplate, favoring TypeScript and npm.
But Win32 endures. GitHub demos (like the author’s repo) prove it: 10KB executables for shaped, animated windows. No 100MB runtimes. Security benefits too—smaller footprint means fewer vulns. Chromium’s history shows exploits galore; native code, if audited, exposes less.
Revival makes sense for niches: kiosks, embedded systems, or perf-critical tools. Imagine a calculator skinned as a retro device, using 2MB not 50. Or crypto wallets with tamper-evident shapes. Windows 11’s Snap Layouts and Mica effects nod to customization, but true control demands direct API.
Microsoft hasn’t killed it—DWM composites layered windows fine on modern GPUs. The loss stems from developer choice. If bloat irks you, drop frameworks. Win32 delivers raw power, low overhead, and visual flair. Apps regain soul; systems run leaner.



