Is there a way to get the Hdc directory from LoadResPicture? Can i cast it, or use it directly as a Hdc? or is there a way to get a Hdc from a image out of a resource file?
If not what it the best way to do it without the loading process being seen?
Printable View
Is there a way to get the Hdc directory from LoadResPicture? Can i cast it, or use it directly as a Hdc? or is there a way to get a Hdc from a image out of a resource file?
If not what it the best way to do it without the loading process being seen?
If you want to use LoadPicture check out my tutorial (direct link). I dont know about LoadResPicture, but if it loads a iPictureDisp you can use it instead.
Thanks, but found a better way:
You can also create an array of StdPicture to store graphics in Memory until you need them.Code:Dim X as New StdPicture
set X = LoadPicture("C:\Windows\circles.bmp")
BitBlt X.Hdc, 0, 0, 32, 32, Tile, ActFrame * 32, 0, vbSrcCopy
sorry, change that last line to:
It doesn't allow raster operations thou, I might end up uing some of your code :)Code:X.Render(Destination:=Picture1.hdc ,xDest:= 0, yDest:= 0, Destwidth:=32, Destheight:=32, xSource:=0, ySource:=0, SourceWidth:=32, SourceHeight:=32, NULL)
Thanks