I guess I thought this was easy!
Im used to a call like:
PLAY(C:\SomeFolder\mysound.wav)
So I read the archive and the simplist code that the guy said worked is below. Why cant i get it to work?
Yes! You're onto something. I tried the following and it worked
also. No need for the stringable stuff.
sounds.rc
------------------------------------------------------
howdy rcdata welcome.wav
bubye rcdata bye.wav
------------------------------------------------------------
#COMPILE EXE
#RESOURCE "sound.pbr"
#INCLUDE "WIN32API.INC"
FUNCTION PBMAIN() AS LONG
LOCAL lpWav AS BYTE PTR
hInst&=GetModuleHandle("")
hRes& = FindResource(hInst&,"howdy",BYVAL %RT_RCDATA)
lpWav = LockResource(LoadResource(hInst&, hRes&))
CALL PlaySound(BYVAL lpWav,hInst&,%SND_MEMORY OR %SND_ASYNC)
FreeResource hRes&
DIALOG NEW 0,"Sound Demo",,,200,100,0,0 TO hDlg&
DIALOG SHOW MODAL hDlg&
END FUNCTION
------------------
Kind Regards
Mike
Im used to a call like:
PLAY(C:\SomeFolder\mysound.wav)
So I read the archive and the simplist code that the guy said worked is below. Why cant i get it to work?
Yes! You're onto something. I tried the following and it worked
also. No need for the stringable stuff.
sounds.rc
------------------------------------------------------
howdy rcdata welcome.wav
bubye rcdata bye.wav
------------------------------------------------------------
#COMPILE EXE
#RESOURCE "sound.pbr"
#INCLUDE "WIN32API.INC"
FUNCTION PBMAIN() AS LONG
LOCAL lpWav AS BYTE PTR
hInst&=GetModuleHandle("")
hRes& = FindResource(hInst&,"howdy",BYVAL %RT_RCDATA)
lpWav = LockResource(LoadResource(hInst&, hRes&))
CALL PlaySound(BYVAL lpWav,hInst&,%SND_MEMORY OR %SND_ASYNC)
FreeResource hRes&
DIALOG NEW 0,"Sound Demo",,,200,100,0,0 TO hDlg&
DIALOG SHOW MODAL hDlg&
END FUNCTION
------------------
Kind Regards
Mike
Comment