I have a MemoryDC attached to a Bitmap, and I want to draw the current
contents of the MemoryDC to itself with an offset (thus, the bitmap is
partially drawn over itself; this is used to simulate screen
scrolling). I tried this:
dc.DrawBitmap(self.mapBitmap, xOffset, yOffset)
(self.mapBitmap is the Bitmap that the DC is attached to)
And while it worked on my OSX machine, it didn't work for another
developer who was running Windows 7. So I replaced the code with this:
On Windows you can not have more than one HDC using the same HBITMAP at the same time, so I don't think there is a better way.
···
On 10/11/12 6:45 PM, Chris Weisiger wrote:
I have a MemoryDC attached to a Bitmap, and I want to draw the current
contents of the MemoryDC to itself with an offset (thus, the bitmap is
partially drawn over itself; this is used to simulate screen
scrolling). I tried this:
dc.DrawBitmap(self.mapBitmap, xOffset, yOffset)
(self.mapBitmap is the Bitmap that the DC is attached to)
And while it worked on my OSX machine, it didn't work for another
developer who was running Windows 7. So I replaced the code with this: