|
Then go for capturing key press
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|
|
I have encountered the same problem before, but I did not really fix it. I just made some work around with it. What I did is I used a different command id for the button. I did not use IDOK. Resulting the command ID to be unhandled. Hope this help.
SDE
|
|
|
|
|
MarcoNedwig wrote:
...without ovverriding the OnOK method?
What do you have against this? It's the natural thing to do. Read here for a good explanation.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
My application uses ReadFile() API in asynchronous mode.
While in the Debug mode it reads 29 bytes from the port ,
it reads only 7 bytes in Release mode.
Is there any known issues with the use of ReadFile(),
or is there a work around for this issue.
An early reply would be very helpful.
Thanks!
Pratheesh
|
|
|
|
|
difference of working in debug/release mode is usally because some variables were not initialsed properly before it is used.
If any structure is passed to the api makesure that you zeromemory it.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
This may have to do with timing issues. As the code executes more quickly in release mode, there may not be enough time for the port to receive as many bytes when the call returns.
onwards and upwards...
|
|
|
|
|
can anybody guide me to write c or c++ code to play an raw audio files
thank you
bye
sham
|
|
|
|
|
create a buffer with the characteristics of the raw sound (srate, bits etc) then copy the data in and start playing it.
Don't try it, just do it!
|
|
|
|
|
i didn't get what your are trying say. please an you be more specfic.
|
|
|
|
|
I propose that you use DirectSound.
You create a buffer with the specifications of the wave data (sample rate, bits/blocksize, ...), then you lock the buffer, copy the data in, unlock it and then start playback. read the sdk for further information.
Don't try it, just do it!
|
|
|
|
|
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.
Dimenser
|
|
|
|
|
suggestion which you have given it support for only .wav file ,but i need to play .raw files at some sampling rate(Fs=8000).plz guide me.
|
|
|
|
|
simple, to play a .wav file in VC++ use
PlaySound(...) function //look for the parameters at www.msdn.com
And dont forget to include the winmm.lib in the project settings.
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
but i want play this raw with some sampling rate(Fs=8000), i don't thing this would support it.
|
|
|
|
|
Hi!
I have an std::string object;
std::string messages = "MSG Go and have a lunch. MSG Hi how are youMSG are you fine";
In this string i expect there are many messages and each message starts with "MSG" and ends till next "MSG" is found. I want to separate all these messages. How can i do so ??
Imtiaz
|
|
|
|
|
For example (untested...),
std::string::size_type p = messages.find ( "MSG" ) ;
std::string::size_type p2 = std::string::npos ;
while ( p != std::string::npos )
{
p2 = messages.find ( "MSG", p + 1 ) ;
DoMessage ( message.substr ( p, p2 )) ;
p = p2 ;
}
Paul
|
|
|
|
|
Nice method. Thanks!
The below is tested one.
void main()
{
std::string messages = "MSG: Apple. MSG: Banana.";
std::string::size_type p = messages.find ( "MSG" ) ;
std::string::size_type p2 = std::string::npos ;
while ( p != std::string::npos )
{
p2 = messages.find ( "MSG", p + 1 ) ;
string ss = messages.substr ( p, p2 );
cout << ss << endl;
p = p2 ;
}
}
Maxwell Chen
|
|
|
|
|
How to find - which area of Window made "invalid" ?
When else window moves over my CDialog,
I need to find which area is declared as "invalid",
to redraw background of appropiate childs,
but nt All each time.
- in OnEreaseBackground(CDC* pDC)
Thanks.
|
|
|
|
|
GetUpdateRect(..);
might be of some help to you.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Thanks.
How to set for control another Client area ?
|
|
|
|
|
vgrigor wrote:
How to set for control another Client area ?
I didnt get your question.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Need to enlarge child window area,
ao hay react according to event on that other area.
|
|
|
|
|
If you have the pointer to the child window or a window handle to that child window then you can use SetWindowRect(...) to resize the window.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
thanks, but it is need to get size to
draw as previously.
But react as bigger thing.
some clipRect function does not that ?
|
|
|
|
|
Sorry i am out of ideas
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|