|
-
Jan 17th, 2001, 02:42 AM
#1
Thread Starter
Hyperactive Member
-
Jan 17th, 2001, 05:57 AM
#2
Lively Member
-
Jan 17th, 2001, 06:41 AM
#3
-
Jan 17th, 2001, 12:40 PM
#4
Frenzied Member
Yes it should work with mmsystem.h but unresolved external shi* error occurs. I had this error when i used the wininet.h but the problem was solved by adding the wininet.lib in the project settings. There may be a *.lib for mmsystem but it is not called mmsystem.lib.
-
Jan 17th, 2001, 02:38 PM
#5
-
Jan 17th, 2001, 03:07 PM
#6
Frenzied Member
Yes! Winmm.lib.So for Wak:
Goto Project->Settings->link tab->and under library modules add Winmm.lib. Then add this code.
Code:
#include <mmsystem.h>
...
PlaySound("c:\\windows\\media\\chimes.wav",NULL, SND_ASYNC | SND_FILENAME );
-
Jan 18th, 2001, 12:37 AM
#7
Thread Starter
Hyperactive Member
-
Jan 18th, 2001, 05:43 AM
#8
Frenzied Member
Include the windows.h
Code:
#include <windows.h>
#include <mmsystem.h>
...
PlaySound("c:\\windows\\media\\chimes.wav",NULL, SND_ASYNC | SND_FILENAME );
-
Jan 18th, 2001, 09:17 PM
#9
Thread Starter
Hyperactive Member
-
Jan 18th, 2001, 09:27 PM
#10
Lively Member
-
Jan 19th, 2001, 06:25 AM
#11
Frenzied Member
You dont have to declare the constants in C++ like in VB. 'SND_FILENAME' and 'SND_ASYNC' are constants not variables by the way. Just include the files and they shouldn't be undeclared then.
Code:
//put this at the beggining of the cpp file
#include <windows.h>
#include <mmsystem.h>
//then put this on some event (ex.button click)
PlaySound("c:\\windows\\media\\chimes.wav",NULL, SND_ASYNC | SND_FILENAME );
-
Jan 20th, 2001, 11:02 PM
#12
Thread Starter
Hyperactive Member
-
Jan 21st, 2001, 09:33 AM
#13
I use the Platform SDK.... it's a great tool.. you should get it..
I think it's available from:
http://msdn.microsoft.com
-
Jan 24th, 2001, 02:44 PM
#14
Hyperactive Member
Or better yet, get Visual Studio 6.0 Enterprise Edition.
(I think 7 is on the way...)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|