You have too hook into the WndProc chain to get native Win32 messages.
See http://lists.wxwindows.org/archive/wxPython-users/msg23265.html
What's the proper way to quit the application then? When you close
this window, the app is still running.I don't know. Perhaps you need to catch EVT_CLOSE and reset the old
WndProc.
Ok I tried that but when I reset the old WndProc in the EVT_CLOSE
handler, I get the following:Traceback (most recent call last):
File "wm.py", line 17, in OnClose
oldWndProc)
TypeError: object must be callable or a dictionaryoldWndProc is an Int so I guess it corresponds to the C++ address of the
underlying function. How to get this function?
Looking at the pywin32 docs, there are two sightly different functions:
win32api.SetWindowLong
win32gui.SetWindowLong
I haven't tried it, but as I read the docs the former accepts integers,
while the latter onyl accepts dicts or callables.
Thomas