Skip to content
0:00 / 0:00

#win32#windowsapi#c

Hello, Windows! RetroCoding "Hello World" for Windows with Dave

Dave's Garage

1.1M subscribers • 14 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Dave, creator of Dave's Garage

Intermediate. Assumes working knowledge.

124K views5 years ago1 recommendation

Systems programmingProgramming languagesCOperating systems

Dave Plummer demonstrates how to write a classic Win32 'Hello World' application from scratch in pure C.

See the Art of Code as Dave crafts a new Windows Hello program from scratch in the editor with no assists. Dave writes clean code in pure C for your enjoyment. A great source of coding style as a tutorial for Windows Programming. What Dave develops here is effectively a hybrid of the MSDN sample for "Hello, World" and Charles Petzold's version of rendering the client area. Coming Soon: Hello, Assembly! where Dave codes Hello World in pure ASM for Windows. Errata: At about I make reference to the WndProc, when I really mean WinMain. - You may have noticed I typo’d the WinMain signature as HRESULT, rather than LRESULT. Good eye, and of course I fixed this before running it! - TranslateMessage(%msg) was clearly supposed to be TranslateMessage(&msg), sorry! - As trivia, under Win16, WPARAMs were WORDs and LPARAMs were LONGs. Today, they’re both 32 bits. Here's the code that compiles in the episode without any warnings. Remember this is just the C, you'd still need resources, icons, etc. Best bet honestly is to generate an empty Win32 project with VC, which provides you with sample code quite close to this (but it doesn't paint). pastebin.com/07QRqaW0

Why it's here

1 person recommends this

What people say. Recommended as a practical demonstration of raw Win32 programming in C.

u/pkrosin r/programming • Recommends

This video shows an example of doing this and more on windows 11 and using visual studio to build the code. And he has a follow up video doing the same thing in assembly. So yeah, win32 programming can still be done