[python-win32] Fwd: Modifying the system menu
James Matthews
nytrokiss at gmail.com
Wed Sep 17 05:48:56 CEST 2008
---------- Forwarded message ----------
From: <raj.indian.08 at gmail.com>
Date: Tue, Sep 16, 2008 at 8:31 PM
Subject: Modifying the system menu
To: python-list at python.org
Hi all,
I am trying to modify the system menu of all the applications in
my machine.
For example say - I am creating multiple desktops for windows -
and I want to give every application the capability to be moved across
different desktops. So I wanted to modify the basic system menu list
to include the new options.
The methods I could think of are -
1. Modify the basic windows set of system menu values (best option)
or
2. Poll every few milliseconds and modify the system menu values of
the active window
For (1) I couldnt think of a way to do it. Is it even possible using
python?
For (2) I wrote the following code for basic testing:
hwnd = win32gui.GetForegroundWindow()
hw = win32gui.GetSystemMenu(hwnd, False)
if hw != None:
win32gui.AppendMenu(hw,win32con.MF_SEPARATOR,0,'-');
and it shows the following error: pywintypes.error: (1401,
'AppendMenu', 'Invalid menu handle.')
If anyone could help me out in both the options (1) and/or (2), I
would be very thankful.
Thank you very much in advance,
A python newbie
--
http://mail.python.org/mailman/listinfo/python-list
--
http://www.goldwatches.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080916/cd251a13/attachment.htm>
More information about the python-win32
mailing list