[python-win32] HookMessage fails

TK Soh teekaysoh at gmail.com
Tue May 15 18:47:46 CEST 2007


On 5/15/07, Niki Spahiev <niki at vintech.bg> wrote:
> >> In order to hook more messages (e.g. WM_SIZE) you must recompile pywin32
> >> with PYWIN_WITH_WINDOWPROC defined
> >
> > I'm confused. The hooks appeared to work fine, though only in the
> > dialog opened from the specific explorer window as I described
> > earlier. I've tried WM_SIZE, WM_ACTIVATE, etc.
> >
> > BTW, I'm using ActivePython 2.4, which comes with pywin32 bundled. I'm
> > not sure if PYWIN_WITH_WINDOWPROC is defined in ActivePython.
>
> Hooks are based on special MFC glue code. When this glue code is not
> active some messages are handled only by PYWIN_WITH_WINDOWPROC build.

The hooks are working, so I guess PYWIN_WITH_WINDOWPROC support has
indeed been compiled into ActivePython. The only problem now is the
strange behavior when sometime the hooks don't get triggered. Any
suggestion on workaround?

Thanks.


More information about the Python-win32 mailing list