This is a bit of an abstract question, so I’ll provide the necessary use cases to make this a little more concrete. If code needs to be posted for clarity, just say the word and I’ll be sure to do so. I’ll write examples for clarity as well.
Question
What I’d like to know is whether or not it’s possible to create wrappers in C++ for the win32 API? This would be for a simple game engine in particular. The examples posted are merely examples, and not quite questions themselves in the sense that I’m asking them directly, but rather using them as extensions for understanding the main question. Although if anyone wishes to answer these as well, it would be helpful.
Example One
I have a simple WndProc function which is part of my App::Game class which I would like to be able to assign to a WNDCLASSEX, yet, because of the fact that it has a namespace and is part of a class, I fear there is no way to do this. At first I thought of overloading, then I realized that the wc.lpfnWndProc is part of a struct, and therefore un-overloadable.
Example Two
Hiding the WinMain underneath the normal C/C++ main function, by creating the main function and having it call WinMain.
Try http://vaca.sourceforge.net/