|
Check if PlaySound() is of any use to you.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Hey Thanks to WhiteSky as well as Brahmma for your reply....
I have used playsound() as well as MCI controls to play wav file, but I don't want that way to play my wave files. I just want to play it through waveform audio functions.
Even I want to increase/decrease the speed of play.
CraZyToLearn
|
|
|
|
|
CraZyToLearn wrote: I want to increase/decrease the speed of play.
Take a look here Ey Media Player[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
You can use also of MCI functions for play your file
|
|
|
|
|
I want to play .wav file using WAVEFORMATEX and using the functions waveOutOpen, waveOutWrite.
I have tried it, but I could play only part of the file. And even I want to control the speed of that played file. Please Help me out.
Thanks in Advance
CraZyToLearn
CraZyToLearn
|
|
|
|
|
Check if PlaySound() is of any use to you.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Hello
I've already posted those questions but it was Sunday night so probably nobody had seen it;)
I have a DLL which installs system wide hook using SetWindowsHookEx(WH_Mouse,...), can I use normal PostMessage(main_application_hwnd_handle,...) to inform my application about some event which happend inside this DLL?? I tried it, but it seems not working. PostThreadMessage(main_application_thread_id,...) works fine. In MSDN I couldn't find any information that HWND handle in PostMessage() should belong to the calling process/thread...?
My second question is, how to capture LVM_HITTEST messages, I mean which hook could I use to capture system wide LVM_HITTEST messages? I need also WM_LMOUSEDBLCLK messages which I capture using WH_MOUSE hook. Is it possible to capture those two messages using only one hook? I've partialy solved this problem by sending LVM_HITTEST message to the hooked window from the WH_MOUSE hook, but I don't think it's 'clean' and for sure it generates additional performance hit...
Last question - how to find (in a 'safe and compatible way') HWND to the desktop window "FolderView" of class "SysListView32"? It has a handle 0x10094 but I think I can't hardcode it to my application... Now I use:
HWND h1=::FindWindowEx(NULL,NULL,"Progman","Program Manager");
HWND h2=::FindWindowEx(h1,NULL,"SHELLDLL_DefView",NULL);
m_hwnd_desktop=::FindWindowEx(h2,NULL,"SysListView32",NULL);
is it safe? (single m_hwnd_desktop=::FindWindowEx(NULL,NULL,"SysListView32","FolderView") returns NULL..?!?)
Thanks for any help (and thanks to Naveen R for answering my previous question at 5 o'clock;)
Pat.
|
|
|
|
|
I have created a program in which I need to determine the availability
of a Shared folder path.
Here is the sample code
*********************************
#include <io.h>
m_sCopyToDrive = "t:\\test\\";
if( ::_access(m_sCopyToDrive.c_str(),0) == -1)
{
AfxMessageBox("Network is Down");
return FALSE;
}
else
{
AfxMessageBox("Network is UP");
}
*****************************************
To check if the network is up I ran the following test.
If Network connected.... result imediate Message box "Network is up"
Disconnect ethernet cable from network.
Program runs and after about 3 minutes "network is down" message box
appears. It takes about another minute for function to return.
Is there any other way to test if the network path is available or not
Thanks for the help,
|
|
|
|
|
I don't know if it's any quicker, but look at the ISensNetwork interface.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have a dialog with two browse buttons on it. If i press the frist one, select a file than press the seccond one, my application crashes and i can't figure out why . Here's the code:
void CAddEquipDlg::OnBnClickedBrowsedb()
{
char szFilters[]=
"Access DB (*.mdb)|*.mdb|All Files (*.*)|*.*||";
CFileDialog fDlg(TRUE,
"mdb",
"*.mdb",
OFN_FILEMUSTEXIST| OFN_HIDEREADONLY,
szFilters,
NULL
);
if (fDlg.DoModal()==IDOK)
{
m_sDB = fDlg.GetPathName();
}
SetCurrentDirectory(m_sCurDir);
SetDlgItemText(IDC_DB,m_sDB);
AfxGetApp()->WriteProfileString("Connection", "Database",m_sDB);
}
void CAddEquipDlg::OnBnClickedBrowseequip()
{
char szFilters[]=
"CSV Files (*.csv)|*.csv|All Files (*.*)|*.*||";
CFileDialog fDlg(TRUE,
"csv",
"*.csv",
OFN_FILEMUSTEXIST| OFN_HIDEREADONLY,
szFilters,
NULL
);
if (fDlg.DoModal()==IDOK)
{
CString bla = fDlg.GetFileTitle();
m_sEQUIP = fDlg.GetPathName();
}
SetCurrentDirectory(m_sCurDir);
SetDlgItemText(IDC_EQUIP,m_sEQUIP);
}
It crashes two out of tree times (with a send/don't send error message in release) and this is the debug info
First-chance exception at 0x7ca5159e in AddEquip.exe: 0xC0000005: Access violation reading location 0x62883720.
Unhandled exception at 0x7ca5159e in AddEquip.exe: 0xC0000005: Access violation reading location 0x62883720.
|
|
|
|
|
At what line it takes you in the code ? if you try to debug crash .
|
|
|
|
|
It's difficult to see the problem. What you can do to narrow the problem is use your debugger (press F5) to see where in your code the crash occurs. Then you can watch for the different variables and check if everything is correct.
You can also set breakpoint (press F9) before the crash to see the evolution of the variables.
|
|
|
|
|
Did you try debugging? Where exactly is the app crashing?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
The debugger does not take me to any line in my code. It crashes after the second filedialog has been displayed and all i get is a "Show disasembly" option which does nothing
|
|
|
|
|
How can that happen! I hope you have set break points. Have you?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
where do you want me to set brakepoints? i've set them for every line in my code but the application dies while browsing for the file (ie: CFileDialog::DoModal() never returns)
|
|
|
|
|
What does the call stack look like?
Is there any line that points to code for which you have source code?
I assume you have built your application for debug...
--
Rog
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
no...debug does not point to my code
|
|
|
|
|
When you come to Domodal set a breakpoint after it
|
|
|
|
|
...it dies during CFileDialog::DoModal() method (i mean, it dies while my dialog waits for CFileDialog::DoModal() to return)
7CA5159E call dword ptr [ecx+14h]
That's the disassembly code, but i don't know what to do with it, i don't think it helps
|
|
|
|
|
Did you try displaying a message box before and after your CFileDialog creation? What happens in that case?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
it dies only if there's verry little time between pressing the two buttons. If i put a message box anywhere...it will work
|
|
|
|
|
eusto wrote: If i press the frist one, select a file than press the seccond one, my application crashes...
What happens if you reverse this process?
Which of the four statements after DoModal() is crashing? Set a breakpoint to find out.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
None of the four statements after DoModal() is crashing!..none! DoModal() doesn't even return. Anyways, i've narrowed it down. It crashes when i move trough folders in the CFileDialog window. And it doesn't really matter wich of the two buttons i press first.
|
|
|
|
|
This is just a complete guess, but how about commenting out everything after the DoModal() call?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|