The code can be downloaded at the top of the text version of this tutorial: croakingkero.com/tutorials/opening_a_window_with_win32/ Please let me know what you think of this tutorial format so I can keep improving it for my future tutorials :)
Thank you so much for this walk through, I've been searching for a concise explanation like this for months! I'm comfortable with reading and understanding Assembly code, but the naming conventions in Windows APIs just confuse the hell out of me. Just one note for your next video, it would be helpful if you could increase or double the code's text size, its a bit difficult to watch on a mobile device, or if your local 🇿🇦 ISP can't reliable stream videos above 480p without constant buffering 😅
@@UltimaN3rd , I first started learning programming in high school (2003 / grade 10 computer science) where they taught us Turbo Pascal. Personally I dislike using higher level abstractions/languages without first knowing how they work under the hood. During an extra curricular course that year on PIC Microchips I was introduced to MIPS/RISC Assembly and fell in love with the low level simplicity! I've been a full-stack web developer now for 5 years, and been feeling increasingly anxious about the big black box between my high level code and everything that happens before it get executed on the hardware - I just have to know how it works! So I set out on a journey of (re)discovery, where I'm trying to build 'something' manually, from the ground up, without relying on code generation complicated IDE tools. To keep it simple, for future cross-platform expand ability, and choosing mostly permissive licensed tools, I've decided going with C, LLVM/Clang, CMake. Which should allow me to develop equally well from either Linux or Windows via WSL For a first real project I'm attempting to build a cross-platform process-manager/task-runner - just for the learning experience. 😅P.S. #OpenToWork #Remote #AvailableImmediately www.linkedin.com/in/carljdp/
What a great tutorial series, thank you! ✨ I read through the deep dive, but I did not fully get the part about the variables "window_class" and "window_class_name". 😔 The deep dive says they are declared static to avoid heap allocation, and it is to avoid running out of heap space. But how could this be a problem for local variables in a function that is only called once? I would appreciate any hint or explanation! 🙂
This causes some weird resizing issues? Like, when playing with the window, the cursor would sometimes show the resize icon in the middle of the frame And sometimes it just doesn't listen to you trying to resize the window At least, that's what my laptop's doing I followed a different tutorial that did something similar in C++ and it also had the same issue
This tutorial was intended to be the minimum to get a window open, so those issues are expected. To fix the cursor, at line 14 add: window_class.hCursor = LoadCursor (NULL, IDC_ARROW); Resizing the window correctly requires handling the WM_SIZE window event. That's included in my "drawing pixels to a window" tutorial: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-q1fMa8Hufmg.html Cheers.
@@UltimaN3rdThanks man, I couldn't find hints anywhere as to why it acts weird. That line fixes it completely. Will definitely be watching the rest, too!