Hello people. I am trying to copy an image from a picture box onto a directdrawsurface7. For some reason the bitblt API just wont do its job. Every example I have seen on the web seems to be the same
Anybody got any advice as to why it wont be working?Code:'Create The Image DDSD.lFlags = DDSD_CAPS + DDSD_HEIGHT + DDSD_WIDTH DDSD.ddsCaps.lCaps = DDSCAPS_3DDEVICE DDSD.lWidth = DXRect.Right - DXRect.Left DDSD.lHeight = DXRect.Bottom - DXRect.Top Set DXSurface = DDraw.CreateSurface(DDSD) SurfaceDC = DXSurface.GetDC Debug.Print BitBlt(SurfaceDC, 1, 1, DDSD.lWidth, DDSD.lHeight, PBBox.Image, DXRect.Left + 1, DXRect.Top + 1, vbSrcCopy) DXSurface.ReleaseDC SurfaceDC![]()




Reply With Quote