← Back to context

Comment by that_jojo

6 years ago

> You give the system a callback and it calls you with an event

Maybe I haven't done enough WinAPI programming, but where is that true? I know there are a few helper functions that automatically dispatch an event to a callback, but I thought in general all events had to be intercepted and dispatched in the message loop

Yes but windows calls your event loop directly for WM_PAINT as well as the event loop calling a system function that calls your window procedure, again investing control. On the Mac you used to hit test the event yourself and figure out which window it was meant for.