ZiNgA BuRgA
Smart Alternative
Posts: 17,024.1882 Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1887
|
RE: [blog] Fffffffffffffffffff Opencv
(26/08/2012 07:45 PM)Tetris999 Wrote: After that, I fall flat, as I don't understand the whole "messaging" system that they have in place.
If you've ever done event driven programming, that's essentially what it is.
Perhaps what you're using is too low level - maybe try something which encapsulates this messaging in events instead.
(26/08/2012 07:45 PM)Tetris999 Wrote: 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.
They're just aliases. You'll probably see a lot of them when using libraries.
They may not be explained fully in a textbook, but really the idea is so that you don't really need to know what they are.
The aim of this abstraction is probably to increase portability (and readability maybe, function pointers can look ugly). For example, LRESULT CALLBACK probably just resolves to a 32-bit function pointer. But if you were to compile it as 64-bit, this would obviously need to be a different type. To save you the hassle, using the predefined types will automatically set the right thing for you.
(26/08/2012 07:45 PM)Tetris999 Wrote: 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.
Not nooby, but sane. No-one really wants to handle all this nonsense - it's really unnecessary.
|
|
27/08/2012 12:47 AM |
|