[EMAIL PROTECTED] wrote:
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.')
Works for me. The following adds a separator and the string "Hello" to my (Console) window's system menu <code> import win32con import win32gui hwnd = win32gui.GetForegroundWindow () hmenu = win32gui.GetSystemMenu (hwnd, False) win32gui.AppendMenu (hmenu, win32con.MF_SEPARATOR, 0, '') win32gui.AppendMenu (hmenu, win32con.MF_STRING, 100, 'Hello') </code> TJG -- http://mail.python.org/mailman/listinfo/python-list
