I built a native Windows Todo app in pure C (278 KB, no frameworks)

Binary size and optimization

  • Many commenters focus on how small a Win32 app could be: claims range from “under 20 KB in C” to “2–6 KB in assembly” for comparable utilities.
  • Several people reproduce or recompile the app: with modern MinGW toolchains and flags like -Os, -Oz, -s, and -flto, they report EXEs around 47–100 KB, well below the original 278 KB.
  • Later releases shrink the binary to ~27 KB by enabling size optimizations and using UPX compression.
  • There’s detailed discussion of avoiding or minimizing the C runtime (CRT): replacing memcpy/memset with Win32 functions, or omitting the CRT entirely and using only Win32 APIs for memory, strings, and file I/O.
  • Debate over static vs dynamic CRT linking: static can yield a smaller single EXE (unused code stripped), while dynamic reduces per‑EXE size but may require shipping DLLs. For this tiny app, static CRT is seen as the main “bloat.”

Runtimes, DLLs, and Windows versions

  • Long subthread on which CRT MinGW uses (MSVCRT vs UCRT), how that interacts with OS support, and whether the CRT counts as “part of the OS.”
  • Consensus that modern Windows ships an in‑box UCRT, so dynamically linking it is usually fine if you target recent Windows; supporting very old versions complicates this.

Manifests, DPI, and “modern” UI behavior

  • Multiple comments explain that without an application manifest, Windows assumes an “ancient” app: you get classic controls, conservative defaults, and poorer DPI behavior.
  • Manifests can declare OS compatibility, DPI awareness, long-path support, use of themed controls, and UTF‑8 code page; examples and MSDN links are shared.
  • Alternatives like calling SetProcessDpiAwarenessContext or CreateActCtx are mentioned, but manifests are recommended for styling and DPI.

Win32 GUI techniques and language choices

  • Some suggest using dialog resources (.rc + CreateDialog) instead of manual CreateWindow calls: this yields automatic tab order, keyboard behavior, DPI‑independent layout, and easier maintenance.
  • Others prefer straight API calls for portability to other languages or to avoid resource tooling.
  • Debate over C vs C++: critics want RAII, std::string, WIL/WTL/ATL; defenders argue that plain C is a good learning exercise and fits the low‑level Win32 style.

Quality, nostalgia, and scope

  • Critiques: use of strcpy/sprintf, memory leaks, fixed todo limits, missing keyboard niceties, and loose use of the word “modern.”
  • Supportive voices view it as a fun, nostalgic Petzold‑style project, impressive for its small, readable codebase and native feel, even if not production‑grade.