2 ms·
Desktop GUIs by necessity always use a message loop under the hood. WndProc certainly worked and you could build GUIs with it (same for using CreateWindow, impl
by formerly_proven 4y ago
Desktop GUIs by necessity always use a message loop under the hood. WndProc certainly worked and you could build GUIs with it (same for using CreateWindow, implementing resizing on foot in WM_SIZE and using resource files for dialogs - also subclassing for making those fancy progress bars). But it's also verbose and at the end of the day you have a giant function handling dozens of messages and passing messages back and forth with other wndprocs. If we want to stay on the message level, both the signal/slot paradigm and/or using coroutines are just better, especially the latter is a very natural fit for UIs.