3 ms·
The 90s called and want their WndProc back.
by formerly_proven 4y ago
The 90s called and want their WndProc back.
- sph 4y agoIf it's old it doesn't mean it's bad. The message loop model for GUIs is/was great.
- silon42 4y agoMore or less. I'm thinking that a single-thread for UI model could fit well for Rust.
- formerly_proven 4y agoDesktop 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.
- deleted 4y ago[deleted]