hi, i can't seem to create a bitmap in memory using pywin32. my assert fails, telling me that the bitmap size is (0,0)?
here's fragments: class window: def __init__ ... self.hwnd = CreateWindow(...) wnd=CreateWindowFromHandle(self.hwnd) wdc=wnd.GetDC() dc=wdc.CreateCompatibleDC(wdc) (l,t,r,b)=wnd.GetWindowRect();h,w=b-t,r-l bm=CreateBitmap() bm.CreateCompatibleBitmap(dc,w,h) assert bm.GetSize()==(w,h),bm.GetSize() oldbm=dc.SelectObject(bm) br=CreateBrush(BS_SOLID,0xffffff,0) dc.FillRect((0,0,w,h),br) pen=CreatePen(PS_SOLID,0,0xeeee00) dc.SelectObject(pen) dc.Ellipse((0,0,w-20,h-20)) bm.SaveBitmapFile(dc,"a.bmp") dc.SelectObject(oldbm) thanks in advance, jack _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32