Click here to Skip to main content
15,906,333 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralReadFile() API Pin
pratheesh1-Apr-04 21:52
pratheesh1-Apr-04 21:52 
GeneralRe: ReadFile() API Pin
Prakash Nadar1-Apr-04 22:46
Prakash Nadar1-Apr-04 22:46 
GeneralRe: ReadFile() API Pin
basementman2-Apr-04 6:09
basementman2-Apr-04 6:09 
GeneralPlaying raw audio files thru c or c++ Pin
shiva shankar1-Apr-04 20:52
shiva shankar1-Apr-04 20:52 
GeneralRe: Playing raw audio files thru c or c++ Pin
Alexander M.,1-Apr-04 22:54
Alexander M.,1-Apr-04 22:54 
GeneralRe: Playing raw audio files thru c or c++ Pin
shiva shankar1-Apr-04 23:30
shiva shankar1-Apr-04 23:30 
GeneralRe: Playing raw audio files thru c or c++ Pin
Alexander M.,2-Apr-04 0:06
Alexander M.,2-Apr-04 0:06 
GeneralRe: Playing raw audio files thru c or c++ Pin
Dimenser2-Apr-04 14:10
Dimenser2-Apr-04 14:10 
Here's what I do in Visual C++ 6.0.
1. Import the .wav file and name it something you'll remember, like IDR_BADBEEP.
2. Add #include "mmsystem.h" to the top of your file.
3. In Project/Settings/Link, add Winmm.lib
4. In the actual code where I want the sound effect to play, add:
PlaySound(MAKEINTRESOURCE(IDR_BADBEEP),GetModuleHandle(NULL),SND_RESOURCE | SND_ASYNC);

This will play the sound effect until the program is shut down, the sound effect is entirely played, or another sound effect is started. It's easy and works.Cool | :cool:

Dimenser
GeneralRe: Playing raw audio files thru c or c++ Pin
shiva shankar5-Apr-04 23:40
shiva shankar5-Apr-04 23:40 
GeneralRe: Playing raw audio files thru c or c++ Pin
avenger_sb255-Apr-04 10:57
avenger_sb255-Apr-04 10:57 
GeneralRe: Playing raw audio files thru c or c++ Pin
shiva shankar5-Apr-04 23:37
shiva shankar5-Apr-04 23:37 
Generalstd::string related Pin
Imtiaz Murtaza1-Apr-04 20:22
Imtiaz Murtaza1-Apr-04 20:22 
GeneralRe: std::string related Pin
Paul Ranson2-Apr-04 1:43
Paul Ranson2-Apr-04 1:43 
GeneralRe: std::string related Pin
Maxwell Chen2-Apr-04 1:53
Maxwell Chen2-Apr-04 1:53 
QuestionHow to find - which area of Window made "invalid" ? Pin
vgrigor1-Apr-04 20:01
vgrigor1-Apr-04 20:01 
AnswerRe: How to find - which area of Window made "invalid" ? Pin
Prakash Nadar1-Apr-04 21:45
Prakash Nadar1-Apr-04 21:45 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
vgrigor1-Apr-04 21:51
vgrigor1-Apr-04 21:51 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
Prakash Nadar1-Apr-04 22:44
Prakash Nadar1-Apr-04 22:44 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
vgrigor1-Apr-04 22:49
vgrigor1-Apr-04 22:49 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
Prakash Nadar1-Apr-04 22:53
Prakash Nadar1-Apr-04 22:53 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
vgrigor1-Apr-04 23:04
vgrigor1-Apr-04 23:04 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
Prakash Nadar1-Apr-04 23:15
Prakash Nadar1-Apr-04 23:15 
GeneralRe: How to find - which area of Window made "invalid" ? Pin
vgrigor1-Apr-04 23:19
vgrigor1-Apr-04 23:19 
AnswerRe: How to find - which area of Window made "invalid" ? Pin
Mike Dimmick2-Apr-04 1:32
Mike Dimmick2-Apr-04 1:32 
Generalget_LocationURL function returns empty string Pin
Abhi Lahare1-Apr-04 19:45
Abhi Lahare1-Apr-04 19:45 

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.