ZiNgA BuRgA Wrote: [ -> ]Somewhat depends on the framework you're using.
MFC? WinForms? WPF? Qt?
Or plain Win32 API?
I switched to WinForms from Win32 API (book I was reading introduced it first and it made my head explode), the plain Win32 API is just very hard to follow wherever I go to find information on it.
I understand the construction of a window with winclassex, registering it in WinMain(), then displaying it. After that, I fall flat, as I don't understand the whole "messaging" system that they have in place.
Well I feel like I got it conceptually at least, messages are queued when things happen (the window gets dragged, keyboard gets keys clicked, etc.) and you call WindowProc to handle them. It's just that putting this all into code is extremely confusing, I think I need to find some simple examples to get the grasp of it.
Not to mention I have NO IDEA what many of the types and functions are, the biggest thing bugging me right now are things like LRESULT CALLBACK WindowProc(...)
Specially that middle word, what is that even referring to? Usually in C++ I see function declarations like RETURN-TYPE FUNCTION-NAME(PARAMETERS), but that middle term is throwing me off. I've read around that it specifies some specific return type relating to windows, but I can't make heads or tails if I'd see this normally in C++; I still don't understand what it means really.
Yeah, as you can see the win32 API is crazy, as you have to handle a lot more things than just whatever feature you want your program to perform (like redrawing the window when you move it) so I went full up nooby and used forms.
So far so good, seems really simple, the form is itself a class with a bunch of members being buttons and labels and what not, not too hard to deal with this.
As far as I know, MFC is basically the object oriented approach (and learning curve dampening) way of writing windows forms? I'll look into it when Winforms can't cut the cake for me. I also don't know what WPF and Qt are @_@.
So many things that I don't know...yawn, as for actually learning this stuff, I guess I have to keep reading.
My design principles are totally out of whack since I've been reading a lot into the mechanical understanding of code without a second thought of it's design :/