[python-win32] message queue

Radu Ciora raduciora at yahoo.com
Fri Oct 5 00:08:02 CEST 2007


My goal is to be able to say when a user clicks a Word toolbar button to be able to "know" what that button was. So that I might provide some feedback or something.
 
Regards,
Radu.

----- Original Message ----
From: Tim Roberts <timr at probo.com>
To: Python-Win32 List <python-win32 at python.org>
Sent: Thursday, 4 October, 2007 11:01:08 PM
Subject: Re: [python-win32] message queue

Radu Ciora wrote:
> So you mean that I won't be able to see Word's message queue, right?
>   

Not by using GetMessage, no.  You wouldn't want to in any case, because
GetMessage *removes* the messages from the queue.  If you COULD get
them, then Word WOULDN'T get them, and the display would be screwed up.

It IS possible to monitor the message queue for another application by
creating a Windows hook, using SetWindowsHookEx.  The WH_CALLWNDPROC or
WH_GETMESSAGE hooks might do what you want.  This can't be done from
Python, because this actually does inject the code directly into other
processes.

What are you trying to accomplish?  There isn't really very much of
interest in a window message queue.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32





      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.html


More information about the python-win32 mailing list