Solved

PlaySound Function

Posted on 2001-09-04
6
746 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
Independent Software Vendors: 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!

 
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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 103
List out all word 7 359
EvenOdd challenge 10 160
I could not set window to top 4 63
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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