Solved

PlaySound Function

Posted on 2001-09-04
6
748 Views
Last Modified: 2013-11-20
Hi, I Want To Be Able To PLay Wave Files (Or Resource) From My Dialog (MFC).
The Problem Is When I Call The Function PlaySound(...,...,..) Or sndPlaySound(..,..).
The Linker Display A Error Message Like This
unresolved symbol, sndPlaySound@12

So, What's The Problem Here Guys?

(I Put <mmsystem.h> in MyDialog.cpp) Is This The Problem?
0
Comment
Question by:Freekeko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
jtwine100697 earned 50 total points
ID: 6453023
You need to link with the "Winmm.lib" library.  On your "Project Settings" dialog, go to the "Link" tab, and add "Winmm.lib" to the "Object/Library Modules: edit control.

PS: Some of the "so-called" experts here will not respond to zero or otherwise low-point questions, or are likely to bitch about getting a less then "A" answer, just so you know...

-=- James.
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 6453028
BTW: Use "PlaySound(...)" instead of sndPlaySound(...): sndPlaySound(...) is only around for backward compatibility.

-=- James.
0
 
LVL 1

Author Comment

by:Freekeko
ID: 6453681
Thanks jtwine.
0
Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

 
LVL 1

Author Comment

by:Freekeko
ID: 6453683
Thanks jtwine. :)
0
 

Expert Comment

by:manunmonu
ID: 6453902
I want to play mp3 format with mfc.
please send me some code & notes
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 6454978
> Thanks jtwine. :)

No problem.  Glad I was able to help.

> [manunmonu] I want to play mp3 format with mfc.

The Windows Media SDK has sample applications that should allow you to play a MP3 file, and even extract ID3 information from it.

-=- James.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 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