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
Solved

PlaySound Function

Posted on 2001-09-04
6
744 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
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 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