How do i play a wavefile using MFC?

Posted on 1998-12-27
Last Modified: 2013-11-20
How do i play a wavefile using MFC? How does the sndPlaySound command work?
Question by:byrdal
1 Comment

Accepted Solution

ppeck earned 50 total points
ID: 1326782
hi byrdal,

there are no MFC classes dealing with wav files.

the sndPlaySound() function simply plays a wav file and it is a very comfortable way
to do that. however, you should only play short wav files with it, since they have to
fit into physical memory. moreover, the documentation says

> sndPlaySound is being maintained for backward compatibility.

so use the PlaySound() function instead (which offers basically the same functionality).

if you need advanced output facilities, check out the sound output class at:



Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: (…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now