Solved

How to play sounds on Visual c++ 6.0

Posted on 2003-11-07
2
482 Views
Last Modified: 2010-04-01
I am used to turbo c++ 3.0

My school uses visual c++ 6 so i want to convert all my files to visual 6.
But my files only work on DoS environments. I need the header files that would replace my DoS files from turbo to visual.

This is hard becouse Visual didnt work the graphics and sound that I had so i need the headers and the syntax examples that would call sound.

Im used to

playsound(45);
delay(100);
from my turbo c 3.0

i have no idea what to include and use for sound in Visual c++ 6.0
0
Comment
Question by:blacken
[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
2 Comments
 
LVL 4

Accepted Solution

by:
n_fortynine earned 25 total points
ID: 9704637
Try this:

#include <mmsystem.h>                 /* For PlaySound */
#pragma  comment(lib, "winmm.lib")    /* Linking to Sound DLL */

PlaySound("click.wav", NULL, SND_FILENAME | SND_ASYNC);

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

717 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