|
mike dano wrote: so frnd if u dnt hav any othr job no need to mak fun of others ok
is this english ?? naaaaaa, SMS !!
BTW, i think This[^] might give you a tip for your seach... (+MSDN)
|
|
|
|
|
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Maybe new version
|
|
|
|
|
mike dano wrote: so frnd if u dnt hav any othr job no need to mak fun of others
Your keyboard doesn't seem to work properly. I suggest you get it replaced.
Regarding your original post:
most of the libraries are common libraries that will be added by the wizard when you create a new project in the IDE.
The other ones are libraries that you've added yourself which means that you are the best suited to answer your own question.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
mike dano wrote: Hey.. how can that be a abusive post???
Where did I say that it was?
I answered his pretty clueless question for best that I could.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Relax.
That wasn't a reply to you. It was originally to toxcct, but he deleted his post some hours ago...
toxcct reported the OP as abusive.
jhwurmbach wrote: I answered his pretty clueless question for best that I could.
Yes, you certianly did.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
hi if i have a library *.lib and the header files of the libraries how can i add it to Borland c++ and other languge lik visual c++
|
|
|
|
|
mervan wrote: hi if i have a library *.lib and the header files of the libraries how can i add it to Borland c++ and other languge lik visual c++
#pragma comment(lib, "myLib")
Or enter your library name "myLib.lib" in the Object/Library modules edit box present in Project->Settings->Link tab.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
hi,
i am looking for way how to enumerate formats for recording from sound card.
I know how to show dialog with it, but I have no idea how to do it without dialog and also how to specify which card (if i had more than one)
Thank you
viliam
|
|
|
|
|
Using DirectSound or Windows Multimedia APIs?
|
|
|
|
|
thank you,
I can use any of them. Any solution would be good.
(I am already using both - but mostly Direct)
viliam
|
|
|
|
|
For DirectSound, the IDirectSoundCapture8::GetCaps() will give you the standard supported formats.
The DSCCAPS struct dwFormats member will contain bit flags indicating supported formats. You
can mask them out with the following defines:
WAVE_FORMAT_1M08 /* 11.025 kHz, Mono, 8-bit */
WAVE_FORMAT_1S08 /* 11.025 kHz, Stereo, 8-bit */
WAVE_FORMAT_1M16 /* 11.025 kHz, Mono, 16-bit */
WAVE_FORMAT_1S16 /* 11.025 kHz, Stereo, 16-bit */
WAVE_FORMAT_2M08 /* 22.05 kHz, Mono, 8-bit */
WAVE_FORMAT_2S08 /* 22.05 kHz, Stereo, 8-bit */
WAVE_FORMAT_2M16 /* 22.05 kHz, Mono, 16-bit */
WAVE_FORMAT_2S16 /* 22.05 kHz, Stereo, 16-bit */
WAVE_FORMAT_4M08 /* 44.1 kHz, Mono, 8-bit */
WAVE_FORMAT_4S08 /* 44.1 kHz, Stereo, 8-bit */
WAVE_FORMAT_4M16 /* 44.1 kHz, Mono, 16-bit */
WAVE_FORMAT_4S16 /* 44.1 kHz, Stereo, 16-bit */
WAVE_FORMAT_44M08 /* 44.1 kHz, Mono, 8-bit */
WAVE_FORMAT_44S08 /* 44.1 kHz, Stereo, 8-bit */
WAVE_FORMAT_44M16 /* 44.1 kHz, Mono, 16-bit */
WAVE_FORMAT_44S16 /* 44.1 kHz, Stereo, 16-bit */
WAVE_FORMAT_48M08 /* 48 kHz, Mono, 8-bit */
WAVE_FORMAT_48S08 /* 48 kHz, Stereo, 8-bit */
WAVE_FORMAT_48M16 /* 48 kHz, Mono, 16-bit */
WAVE_FORMAT_48S16 /* 48 kHz, Stereo, 16-bit */
WAVE_FORMAT_96M08 /* 96 kHz, Mono, 8-bit */
WAVE_FORMAT_96S08 /* 96 kHz, Stereo, 8-bit */
WAVE_FORMAT_96M16 /* 96 kHz, Mono, 16-bit */
WAVE_FORMAT_96S16 /* 96 kHz, Stereo, 16-bit */
For non-standard or non-PCM formats you can try creating a capture buffer and see if it succeeds.
IDirectSoundCapture8::CreateCaptureBuffer() returns DSERR_BADFORMAT if it fails.
Mark
|
|
|
|
|
Hi All,
I have an array of CString [] with me like CString obj[] = {"one","two","three"};
Is there any way to convert this array to an object of CStringArray type. If not, how to insert the elements into CStingArray in the list form as above without using the add() method for every element.
Also is there any method in VC++ similar to the Join() method in VB that converts a string array to string of elements seperated by delimiters.
Thanks in Advance
There are 10 types of people in this world....
Those who understand Binary, and those who don't....
|
|
|
|
|
You have to use Add() IMHO. It's still 2 lines of code:
CStringArray array;
for (int i=0; i<sizeof(obj)/sizeof(obj[0]); i++)
array.Add(obj[i]);
rrrado
|
|
|
|
|
Its not about the number of lines. Its about time. I have lot of arrays which contains atleast 100 elements n im making a real time application. So just wanted to minimize the time. Anyways..Thanks for the reply.
|
|
|
|
|
If you want to reduce the time required to populate the array you can preset the size of the array using SetSize().
If you do not set the size of the array the array will grow by the default of 1 for every Add() which causes the array to be frequently reallocated and copied.
You do not have to know exactly how elements you require because if there is insufficient elements in the array the Add() function will cause the array to grow anyway but by setting the size it will cut down the amount reallocation and copying.
You can always use the FreeExtra() function to release any unused array elements after you have populated the array.
|
|
|
|
|
Excellent answer! Although I would like to point out that the grow-by value is probably not 1, it is some value specified deeper in the code, and should probably be set to some appropriate value. I have actually seen C++ string arrays that where stored in a single continuous buffer with a separate array of {offset, length} pairs.
Oh well, not very important.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
vikram.vit wrote: Also is there any method in VC++ similar to the Join() method in VB that converts a string array to string of elements seperated by delimiters.
If, instead of the MFC containers, you used the standard template library, you could use foreach to write a function object to do this for you.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hmmm.
What about extending CStringArray class ?
class CStringArrayEx: public CStringArray
{
public:
CStringArrayEx(CString*,size_t nSize);
};
#include <Afxtempl.h>
CStringArrayEx::CStringArrayEx(CString* pSrc,size_t nSize):CStringArray()
{
SetSize(nSize);
CopyElements(m_pData, pSrc,nSize);
}
This is quick suggestion. Hasn't put much thought in it.
You can use CStringArrayEx like below,
CString arrString[2]= { "1","2"};
CStringArrayEx objArray(arrString,2);
for (int i = 0; i <2 ;i++)
{
AfxMessageBox(objArray[i]);
}
|
|
|
|
|
Hello everyone,
I want to record the elapsed time for a specific function invocation. What is the most accurate way I should use on Windows platform? Which function call should I use?
regards,
George
|
|
|
|
|
If you want an accurate timer use the multimedia timers. Start the timer at the beginning of your program, add a "volatile int" somewhere and have the timer increase it on each callback. To time your function, check the value of this int before your function and subtract it from the value after your function.
|
|
|
|
|
Hello WalderMort,
What timer do you mean? I am a little confused. Do you mean a function or some tool? Could you show me a sample please?
regards,
George
|
|
|
|
|
Call GetTickCount() before and after function. (If you don't need too high accurancy)
rrrado
|
|
|
|
|
Thanks rrrado!
GetTickCount() could record milliseconds level elapsed time, which is good to me. I have seen that it uses some non-C/C++ standard data types, like DWORD. Do you know how to make such data type compatible in standard C/C++ program?
regards,
George
|
|
|
|
|
George_George wrote: I have seen that it uses some non-C/C++ standard data types, like DWORD.
What's non-standard about an unsigned long ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|