Solved

How to play sounds on Visual c++ 6.0

Posted on 2003-11-07
2
473 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
 
LVL 5

Expert Comment

by:waelothman
ID: 9705378
0

Featured Post

Industry Leaders: 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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

749 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