how would i implement a wav file in a dialog?
Printable View
how would i implement a wav file in a dialog?
Not sure what you're asking.
If you want a dialog that 'plays' wav files the easiest way would be to embed an OLE object in the dialog that is linked to a server that will play the file for you
Not sure what you mean either but if you have a dialog based app and want it to play a wav, say on start up then make sure you use:
#include "mmsystem.h" and add the winmm.lib in the Project, Settings, Link tab, object/library modules box. (VC++ ver 6)
Put the:
PlaySound("yourfile.wav", NULL, SND_FILENAME | SND_SYNC);
in say OnInitDialog()
SND_SYNCH plays the sound then the dialog whereas SND_ASYNC displays the dialog at the same time.
Hope that may be of help