Solved

PlaySound Function

Posted on 2001-09-04
6
736 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

708 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

18 Experts available now in Live!

Get 1:1 Help Now