PDA

Click to See Complete Forum and Search --> : Direct Draw CreateSurfaceFromResource


Acid
Sep 1st, 2000, 08:28 PM
I'm having problems using this method i've followed all the instructions in the sdk documentation on making sure your resource id's are strings etc but i get an error every time

Below is the source for my function:

Public Function TileFromRes(FileName As String, ResID As String) As DirectDrawSurface7

Dim TSDESC As DDSURFACEDESC2
Dim TempSurf As DirectDrawSurface7

With TSDESC
.lFlags = DDSD_CAPS + DDSD_HEIGHT + DDSD_WIDTH
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
.lWidth = 32
.lHeight = 32
End With

Set TileFromRes = objDD.CreateSurfaceFromResource(FileName, ResID, TSDESC)

End Function

kedaman
Sep 7th, 2000, 08:10 AM
Where and what error do you get?