文件名称:PlaySound
- 所属分类:
- DirextX编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 302kb
- 下载次数:
- 0次
- 提 供 者:
- J***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
从资源文件中,载入音声,图片等,并播放声音,或者显示
HINSTANCE h=AfxGetInstanceHandle()
HRSRC hr=FindResource(h,"IDW","WAVE")
HGLOBAL hg=LoadResource(h,hr)
LPSTR lp=(LPSTR)LockResource(hg)
sndPlaySound(lp,SND_MEMORY|SND_ASYNC)
FreeResource(hg)
return 0 -From the resource document, loading voice, pictures, etc., and to play a sound, or show HINSTANCE h = AfxGetInstanceHandle () HRSRC hr = FindResource (h, IDW , WAVE ) HGLOBAL hg = LoadResource (h, hr) LPSTR lp = (LPSTR) LockResource (hg) sndPlaySound (lp, SND_MEMORY | SND_ASYNC) FreeResource (hg) return 0
HINSTANCE h=AfxGetInstanceHandle()
HRSRC hr=FindResource(h,"IDW","WAVE")
HGLOBAL hg=LoadResource(h,hr)
LPSTR lp=(LPSTR)LockResource(hg)
sndPlaySound(lp,SND_MEMORY|SND_ASYNC)
FreeResource(hg)
return 0 -From the resource document, loading voice, pictures, etc., and to play a sound, or show HINSTANCE h = AfxGetInstanceHandle () HRSRC hr = FindResource (h, IDW , WAVE ) HGLOBAL hg = LoadResource (h, hr) LPSTR lp = (LPSTR) LockResource (hg) sndPlaySound (lp, SND_MEMORY | SND_ASYNC) FreeResource (hg) return 0
(系统自动生成,下载前可以参看下载内容)
下载文件列表
PlaySound
.........\Debug
.........\MainFrm.cpp
.........\MainFrm.h
.........\PlaySound.aps
.........\PlaySound.clw
.........\PlaySound.cpp
.........\PlaySound.dsp
.........\PlaySound.dsw
.........\PlaySound.h
.........\PlaySound.opt
.........\PlaySound.plg
.........\PlaySound.rc
.........\PlaySoundDoc.cpp
.........\PlaySoundDoc.h
.........\PlaySoundView.cpp
.........\PlaySoundView.h
.........\ReadMe.txt
.........\res
.........\...\PlaySound.rc2
.........\...\shutter.wav
.........\Resource.h
.........\StdAfx.cpp
.........\StdAfx.h
.........\Debug
.........\MainFrm.cpp
.........\MainFrm.h
.........\PlaySound.aps
.........\PlaySound.clw
.........\PlaySound.cpp
.........\PlaySound.dsp
.........\PlaySound.dsw
.........\PlaySound.h
.........\PlaySound.opt
.........\PlaySound.plg
.........\PlaySound.rc
.........\PlaySoundDoc.cpp
.........\PlaySoundDoc.h
.........\PlaySoundView.cpp
.........\PlaySoundView.h
.........\ReadMe.txt
.........\res
.........\...\PlaySound.rc2
.........\...\shutter.wav
.........\Resource.h
.........\StdAfx.cpp
.........\StdAfx.h