|
As you're capturing audio samples, you can iterate through
blocks of samples to find the peak amplitude. You could use
a progress bar to show the level or draw it some other way.
I personally use a variable that the audio capture thread updates as
samples are captured. A periodic timer (on the UI thread) takes care
of rendering the level.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Experts,
How can I do the following programatically :
1. Open Recycle Bin
2. Empty Recycle Bin
3. Open Disk Cleaner Wizard
4. Open Disk Management
5. Open Fileserver Management
|
|
|
|
|
|
with some mouse clicks. (left and right button clicks)
This signature was proudly tested on animals.
|
|
|
|
|
I was walking through "Window's in a Box"(sic) with a debugger (OllyDbg) the other week and noticed that all of the commands were viewable with very little effort. It's a VB program, but even still, it gives hints as to which .msc file you need to open.
4. Open Disk Management
ShellExecute(NULL, "open", "explorer.exe", "c:\\windows\\system32\\diskmgmt.msc", NULL, SW_SHOWNORMAL);
It'd be better if the drive letter and system dir weren't hardcoded, but you can't simply substitute c:\\windows\\ with %windir% unfortunately.
|
|
|
|
|
enhzflep wrote: It'd be better if the drive letter and system dir weren't hardcoded...
Actually they are not even necessary since the \Windows\System32 folder is part of the search path.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: Actually they are not even necessary since the \Windows\System32 folder is part of the search path.
Yeah, that's what I figured, except removing the absolute path from the code I already had wouldn't work. Just now it dawned on me - why bother to use explorer.exe to open up something that will run from the command line?
So, I just tried this code & found it do do the job:
ShellExecute(NULL, "open", "diskmgmt.msc", NULL, NULL, SW_SHOWNORMAL);
It also has the addd benefit of doing away with the "File download - Security Warning" dialog box that appears when using the code I presented in a previous post.
Much thanks David.
|
|
|
|
|
Hi!
When I run a VC++ 8.0 application, I got an error which states,
"The procedure entry point ??0?$basic_istream@DU?$char_traits@D@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z could not be located in the dynamic link library MSVCP80.dll."
What might be the cause of this error? How do I resolve this error?
|
|
|
|
|
Do you get this error on the development machine? If not, have you got the VC Redistributables installed on the target machine?
|
|
|
|
|
Hi!
Not on the Development machine. But I've installed the VC Redistributables on my machine.
|
|
|
|
|
I suspect the CRT version your program uses is different from that is available on the target machine. If you've installed the redist, then I don't see why this should happen.
OK, see this link: The next level of DLL hell - SxS[^]
|
|
|
|
|
Could u please tell me how to find out which version of the CRT my program is using?
|
|
|
|
|
if you have sourcecode of application, just open itr manifest file. it contain all the information you needed
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Rajesh R Subramanian wrote: OK, see this link: The next level of DLL hell - SxS[^]
DLL Helllllllllllll!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
The good old DLL hell used to be a lot straight forward. But this is *real* hell.
|
|
|
|
|
Hi Experts,
I am using CFileFind class to get the information of folder (size, files, folders).This is working fine with all folders but not with one system folder named "System Volume Information".
Could you tell me what is wrong with it?
|
|
|
|
|
|
Thank you for reply but how can I do this programtically?
|
|
|
|
|
|
Hi all,
I m using CFileDialog class for file saving like this.
CFileDialog avi(FALSE,NULL,NULL,OFN_CREATEPROMPT|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,_T("Backup File|*.BKP|"), this,0);
i want when i select a file for saving the extension is alwaz .BKP
Please tell me how can i do this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
"_$h@nky_" wrote: CFileDialog avi(FALSE,NULL,NULL,OFN_CREATEPROMPT|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,_T("Backup File|*.BKP|"), this,0);
the CFileDialog just return you the path,yuo could write rest of logic after user press ok on the CFileDialog box window!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Please tell me how can do this.
Please tell me with example.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Pseudo code:-
1. FileDialogObject.GetFileName() return you the file path, where you save you file.
2. check for existence of your extension, if it there, leave it otherwise add it to the filename.
3. write code for saving of file.
remember cfiledialog doesn't save file for you, you have to write code for it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Try changing your second parameter:
CFileDialog avi(FALSE,_T("bkp"),NULL,OFN_CREATEPROMPT|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,_T("Backup File|*.BKP|"), this,0);
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hi,
How to write a BYTE array into a file and reading it back from. I used fwrite and fread but it is not working.
Regards,
|
|
|
|