ngomes wrote:Hi calli,
calli wrote:- What is a "message pump"
- how can I implement on in Python?
- why can`t we have a function just reading out the values?
A "message pump" is what is generally called the Windows feature of transmitting "messages" between the system and applications.
Are you able, on your Python script, to process raw Windows messages? Like WM_ACTIVATE or WM_PAINT?
ngomes: If I am able to catch Window's messages what Windows messages am I looking for? Probably not WM events since I am not using a UI
Remember - Python is a cross platform high level dynamic scripting language. All this c++/COM/Windows stuff is pretty alien to Python programmers, and most Python developers are coming from outside and top down. We don't know the ins and outs of Windows, and we are mostly starting with some COM IDispatch object and figuring out what to do with it from there. This is evidenced by the fact that there is no Python standard implementation of the Window's event loop, and no one knows how to make one.
I'm trying to do my homework and learn about the systems I'm using, but I'm starting from a very small knowledge base. Starting from what I know I can only get so far before I'm lost in the maze that is COM/the Window's API. I looked at the 3Dx SDK example code, but it doesn't seem to be doing anything related to what I need, and I don't know what parts to look at. What does
Code: Select all
hr = __hook(&_IKeyboardEvents::KeyDown, IKeyboardPtr, &OnKeyDown);
mean?
hr = hook reference?
&_IKeyboardEvents::KeyDown = the KeyDown method of the IkeyEvent interface
IKeyboardPtr = our reference to the keyboard object
&OnKeyDown = the event handler
What is __hook, where did it come from, what does it implement? How does __hook tie into the windows event system, and what messages would it watch for?