Results 1 to 2 of 2

Thread: Direct Draw CreateSurfaceFromResource

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    22

    Exclamation

    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

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Where and what error do you get?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width