[pywin32-bugs] [ pywin32-Bugs-787563 ] fatal error with taskbar
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-08-23 00:19:22
|
Bugs item #787563, was opened at 2003-08-12 21:59 Message generated for change (Comment added) made by warkid You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=787563&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dietmar Schwertberger (dschwertberger) Assigned to: Nobody/Anonymous (nobody) Summary: fatal error with taskbar Initial Comment: e.g. with demos\win32gui_taskbar.py: Fatal Python error: This thread state must be current when releasing Python 2.3; win32all versions 1.55 and 1.57; Windows 2000 OK with 2.2; 1.48; Windows 98 ---------------------------------------------------------------------- Comment By: Kerim Borchaev (warkid) Date: 2003-08-21 15:20 Message: Logged In: YES user_id=314933 This code just calls CreateWindow and it fails the same way: ################################ import win32gui import win32api import win32con def registerWindowClass(): def OnDestroy(hwnd, msg, wparam, lparam): win32gui.PostQuitMessage(0) # Terminate the app. message_map = { win32con.WM_DESTROY: OnDestroy, } wc = win32gui.WNDCLASS() wc.hInstance = hinst wc.lpszClassName = "warkid.try_CreateWindow.WindowClass" wc.lpfnWndProc = message_map # could also specify a wndproc. return win32gui.RegisterClass(wc) def createWindow(class_atom): return win32gui.CreateWindow( class_atom, "a window", 0, 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, \ 0, 0, hinst, None) hinst = win32api.GetModuleHandle(None) hwnd = createWindow(registerWindowClass()) win32gui.ShowWindow(hwnd, True) win32gui.PumpMessages() ################################### ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=787563&group_id=78018 |