hi, i can't seem to catch a WM_CREATE message in simple code. i expect my code to print 'create', but it doesn't
listing follows. tia, jack from win32api import * from win32gui import * from win32con import * wc = WNDCLASS() hi = wc.hInstance = GetModuleHandle(None) wc.lpszClassName = nm = "name" wc.style=0 wc.hCursor=LoadCursor(0,IDC_ARROW) wc.hbrBackground = COLOR_WINDOW def create(hwnd, msg, wparam, lparam): print 'create' def destroy(hwnd, msg, wparam, lparam): print 'destroy';PostQuitMessage(0) wc.lpfnWndProc={WM_CREATE:create,WM_DESTROY:destroy} cl=RegisterClass(wc) hwnd=CreateWindow(cl,nm,WS_OVERLAPPEDWINDOW,0,0, CW_USEDEFAULT,CW_USEDEFAULT,0,0,hi,None) ShowWindow(hwnd) UpdateWindow(hwnd) PumpMessages() _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32