[python-win32] HookMessage fails
Mark Hammond
mhammond at skippinet.com.au
Thu May 24 16:20:13 CEST 2007
> On 5/23/07, Mark Hammond <mhammond at skippinet.com.au> wrote:
> > I think the problem is likely related to the "main frame"
> issue quoted below.
> > I suggest you debug what the app's "main frame" is at any
> given point in
> > time, and confirming the value is still appropriate.
>
> I tried putting this statement in the context menu before calling the
> dialog, as well as inside OnInitDialog() of the custom dialog, but
> both generate the same errors:
>
> print "mainframe = ", win32ui.GetMainFrame()
>
> win32ui: The frame does not exist
>
> I wonder this could be caused by the fact the my code isn't really an
> app, but simply a shell extension. Anything else I should try?
I hate to say it, but if you really are a "shell extension", you really should be using win32com.shell and win32gui. win32com\shell\demos might give you some inspiration. On the plus side, this is stuff I'm still regularly involved in, so my ability to offer real advice remains high (and actually higher than win32ui). I had a similar conversation today, where I effectively declared win32ui 'dead' - more because it is dead in the Windows development world than because it is dead in pywin32. On the plus side, I just today got pythonwin working in an x64 environment (thanks to Steve Yin for contributing the bulk of that)
Cheers,
Mark
More information about the Python-win32
mailing list