Post

 Resources 

Console


RE: DirectX 7 surfaces&buffers Adam Hoult (1 reply, 1 views) (2000-May-30)
-
Hi, You should place the name in quotes (as far as I am aware), but you using the file parameter wrong, you should either leave it blank, or pass the executable name (as shown in the sample code i have posted below) Here is how it should work (try this first) Set BaseSprite = DD.CreateSurfaceFromResource(App.Path & "\MyEXE.exe", "BASE", BaseDesc) or Set BaseSprite = DD.CreateSurfaceFromResource("", "BASE", BaseDesc) The latter will use the current resource file. This should also be the case for DirectSound. Of course loading from a resource will only work from the Compiled Executable, not from within the ide, in this case can set a flag to let your program know if you are in the ide or compiled executable, then you can simply either load it from a bmp etc or if compiled, use the resource file. (There are other ways) But anyway if you are still unsure take a look at the ClubMet example that comes with the DX7 SDK (in DMusic\Src\ClubNet). If you don't have that sample let me know. (It loads a surface from a resource file). HTH Adam


-
Up One Level | Back to Forum

RE: DirectX 7 surfaces&buffers pasutti (0 replies) (2000-May-31)

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