I have coded a lot with Windows GDI, but I am not sure I understand what your question really is.
You can create a memory bitmap with DC handle like this (pseudocode):
You can create a memory bitmap with DC handle like this (pseudocode):
; SomehDC is the DC of some bitmap with desired properties (bit depth etc) Bitmap = CreateCompatibleBitmap(SomehDC,Width,Height) hBitmap = GetObjectA(Bitmap,Len(SampleBitmap),SampleBitmap) ; Let's make a DC for the bitmap hDC = CreateCompatibleDC(SomehDC) SelectObject(hDC,Bitmap) SampleBitmap is just an empty variable of this 14 byte long (Visual Basic) type: Type bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As Long End Type