Post

 Resources 

Console


RE: An error... Jay Wheeler (0 replies, 0 views) (2000-Jul-6)
-
This is a function I use. Be sure to release the DC when you're done! (Using the way I described, I would load into a picturebox and then pass this sub the picture's hDC as the source HDC.) Sub dispimgToSurface(srcHDC As Long, backpic As IDirectDrawSurface4, ByVal x As Integer, ByVal y As Integer, ByVal sx As Integer, ByVal sy As Integer, ByVal imagewidth As Integer, imageheight As Integer, oper As Long) 'Backpic is a ddraw surface -- this copies onto a surface from 'srcHDC' Dim MemDC As Long backpic.GetDC MemDC rc = BitBlt(MemDC, x, y, imagewidth, imageheight, srcHDC, sx, sy, oper) backpic.ReleaseDC MemDC end sub


-
Up One Level | Back to Forum


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 247 visitors within the last 20 minutes
RSS News Feed