Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: To compare two Images to find out the mismatch between them Pin
Sarath C5-Oct-06 22:02
Sarath C5-Oct-06 22:02 
AnswerRe: To compare two Images to find out the mismatch between them Pin
Hamid_RT6-Oct-06 8:30
Hamid_RT6-Oct-06 8:30 
Questioncolor the text of radio button Pin
vasmvr5-Oct-06 21:06
vasmvr5-Oct-06 21:06 
AnswerRe: color the text of radio button Pin
prasad_som5-Oct-06 21:18
prasad_som5-Oct-06 21:18 
AnswerRe: color the text of radio button Pin
Hamid_RT5-Oct-06 21:26
Hamid_RT5-Oct-06 21:26 
GeneralRe: color the text of radio button Pin
vasmvr5-Oct-06 23:09
vasmvr5-Oct-06 23:09 
GeneralRe: color the text of radio button Pin
Hamid_RT6-Oct-06 8:30
Hamid_RT6-Oct-06 8:30 
QuestionA Question about playing sound Pin
minihotto5-Oct-06 21:01
minihotto5-Oct-06 21:01 
I try to write a simple playsound program.
It works while it's compiling.
There is no errors return.
The playsound function return 1 value.
But it doesn't play the WAV files.
Can somebody help me why it doesn't play the music?

My code is following.
#include "stdafx.h"
#include <windows.h>
#include <mmsystem.h>
#include <iostream>
#include <winuser.h>
#pragma comment(lib, "winmm.lib")
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{

int i;
i=MessageBeep(0);
cout << i ;
i=PlaySound((LPCWSTR)"c:\\dn.wav",NULL, SND_FILENAME);
cout << i ;
cin >> i;
cout << i << endl;
return 0;
}

I try two methods
1. i=PlaySound((LPCWSTR)"dn.wav",NULL, SND_FILENAME);
2. i=PlaySound((LPCWSTR)"c:\\dn.wav",NULL, SND_FILENAME);
But it still doesn't play the music.

Thanks a lot.
minihotto
AnswerRe: A Question about playing sound Pin
Hamid_RT5-Oct-06 21:12
Hamid_RT5-Oct-06 21:12 
GeneralRe: A Question about playing sound [modified] Pin
minihotto9-Oct-06 6:08
minihotto9-Oct-06 6:08 
GeneralRe: A Question about playing sound Pin
Hamid_RT9-Oct-06 6:51
Hamid_RT9-Oct-06 6:51 
GeneralRe: A Question about playing sound Pin
minihotto9-Oct-06 17:39
minihotto9-Oct-06 17:39 
GeneralRe: A Question about playing sound Pin
Hamid_RT9-Oct-06 18:59
Hamid_RT9-Oct-06 18:59 
GeneralRe: A Question about playing sound Pin
minihotto9-Oct-06 23:00
minihotto9-Oct-06 23:00 
AnswerRe: A Question about playing sound Pin
Naveen6-Oct-06 1:25
Naveen6-Oct-06 1:25 
AnswerRe: A Question about playing sound Pin
David Crow6-Oct-06 2:54
David Crow6-Oct-06 2:54 
QuestionRewrite ISAPI FIlter for IIS 6.0 Pin
eye-designs5-Oct-06 20:33
eye-designs5-Oct-06 20:33 
AnswerRe: Rewrite ISAPI FIlter for IIS 6.0 Pin
Hamid_RT5-Oct-06 20:43
Hamid_RT5-Oct-06 20:43 
GeneralRe: Rewrite ISAPI FIlter for IIS 6.0 Pin
eye-designs5-Oct-06 20:45
eye-designs5-Oct-06 20:45 
GeneralRe: Rewrite ISAPI FIlter for IIS 6.0 Pin
Hamid_RT5-Oct-06 21:10
Hamid_RT5-Oct-06 21:10 
GeneralRe: Rewrite ISAPI FIlter for IIS 6.0 Pin
Hamid_RT6-Oct-06 8:31
Hamid_RT6-Oct-06 8:31 
QuestionDialog box Pin
zareee5-Oct-06 19:09
zareee5-Oct-06 19:09 
AnswerRe: Dialog box Pin
Hamid_RT5-Oct-06 19:13
Hamid_RT5-Oct-06 19:13 
GeneralRe: Dialog box Pin
zareee5-Oct-06 19:26
zareee5-Oct-06 19:26 
GeneralRe: Dialog box Pin
ThatsAlok5-Oct-06 20:14
ThatsAlok5-Oct-06 20:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.