Steve Bonam wrote: > I create a new window but as soon it's drawn it is invisible, no > titlebar, no anything. I draw text on it and it becomes white still > has no titlebar and puts the text on twice. when I kill it from the > interpeter the window finally becomes visible but not repsonsive as > I've killed it's handling? > ... > > > # Create and register new window class > def WndProc(hWnd, msg, wparam, lparam): > print msg > if msg == win32con.WM_PAINT: > print "Painting" > hdc,paintstruct = BeginPaint(hWnd) > PaintDesktop(hdc) > #ExtTextOut(hdc, 100,100,win32con.ETO_OPAQUE,None, "TEST") > EndPaint(hWnd,paintstruct) > return 0 > if msg == 522: > PostQuitMessage(0) > return 0 >
In a window proc, if you do not handle a message, you must forward it to the default window proc. This is not done automatically, so you aren't getting the non-client painting and normal window management. You should add this as the last line in your WndProc: return DefWindowProc( hWnd, msg, wparam, lparam) With that, you get a title bar and a border. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32