|
I'm not sure I understand ...
you only have the name of the file ( test.xml ) ? or the full path name ( C:\Temp\Data\test.xml ) ?
if you only have the name of the file, you need to search your disk to find the file ( FindFirstFile an d FindNextFile, and recurse all folders ).
if you already have the full path, only extract the string up to the last backslash.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi All,
I've got an application which I based on the StillCap demo that comes with the DirectX SDK.
I wrote and tested the software on a Windows 2000 machine but have recently tried the software on a Windows XP machine and suprise suprise the software no longer produces the results we expect!!!
What the software does is to capture frames from the video camera as needed and the perform some processing on the image and then save the image to a RAW file. On the XP machine the saved images color don't save right and there is also a slight 'border' on the left hand side of the image (on the 2000 machine the images are perfect).
I think I've managed to locate a potential cause of the problem, on the 2000 machine the size of the image array in the windows callback is 233472 whereas on the XP machine it is only 230400. Thats a total of 3072 difference which I *think* is the image header, i.e. 1024 * 3 (for RGB).
Does anyone have any ideas on this and how I can fix it.
cheers,
|
|
|
|
|
I think I've now got round this feature by interrorgating the O/S, if its XP then I 'add' the extra bits onto the buffer, this then produces the output file correctly.
I know this is not ideal and would appreciate if someone could still answer this question.
cheers,
Andy
|
|
|
|
|
Hi
In my application i want to change volume control of Main speaker,WaveIn,etc. Is there any simple way to do this. If yes can i get some sample code.
Thanks
JP
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
See if this article gets you started.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks for ur reply . it is very helpful for me. one general question. How can i change the volume of wavein device(mic)?
Thanks
JP
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
P_JAYAPRAKASH wrote:
How can i change the volume of wavein device(mic)?
How about waveOutSetVolume() ?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I think WaveOutVolume is for "WaveOut" devices not for wavein.
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
P_JAYAPRAKASH wrote:
I think WaveOutVolume is for "WaveOut" devices not for wavein.
Fair enough. As my article indicates, I'm not an audio aficionado.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Im trying to develop an application that has some sound processing issues, i need to clip a sound file and put the output in another sound file of the same format. How can i achieve this issue. What libraries and classes i need to use to accomplish that ??
|
|
|
|
|
Hi,
I´m using C++ and WMI to get hold of information from my network cards. The problem is that I only recieve information of my primary, Ethernet network card. I´m intrested to get information from both my primary and my wireless network card. When executing ExecuteQuery() with the query "Select * from win32_NetworkAdapter", is there anyway that I can get that into a list of "network adapters". Possible this already is done and put into the list object sent to exec.query, but I can´t get more than one item from it, even if my wireless network card is actice.
Does somebody have a clue of a solution of my problem. If I have been fuzzy in my description of the problem I can explain it more and hopefully better.
Torben00
|
|
|
|
|
Hi,
I want to find the path of a file for example test.xml.
If test.xml is located in C:\Temp\Data\test.xml, then by giving the file name (test.xml) as input, I want the path as output i.e C:\Temp\Data
Can anyone please help me to do this?
Thanks
Madhavi.
|
|
|
|
|
hi,
use the win32findfile data strcture an use cfindfile class mfc or findfile apis
|
|
|
|
|
Hello,
I'd like to run two successive dialogs in my dialog application. The problem is that when the user exits the first one and the application tries to run the second, it fails (I suspect the message pump gets destroyed).
I've tried creating a dummy window (so that there would always be at least one message target) before running the first dialog but that didn't help)
Any helps? Can I re-ren the pump again or prevent it from ceasing?
Thanks
|
|
|
|
|
|
dlg = new CPoolDlg;
m_pMainWnd = dlg;
int nResponse = dlg->DoModal();
delete dlg;
playoff_dlg = new CPlayoffDlg;
m_pMainWnd = playoff_dlg;
nResponse = playoff_dlg->DoModal();
delete playoff_dlg;
That's the code in InitInstance. I have to say I'm in no way a MFC guru. I played with the code a bit to make the CPoolDlg and CPlayoffDlg members of the CMyApp, and had to make them * in order to be able to create them after the common controls initialization is done. If I comment the first dialog out, the second runs wo problems, if I don't, the DoModal returns -1 (from what I know on some message pump checking call)
|
|
|
|
|
search in the MSDN for Q138681
or just comment the m_pMainWnd lines out.
dlg = new CPoolDlg;
int nResponse = dlg->DoModal();
delete dlg;
playoff_dlg = new CPlayoffDlg;
nResponse = playoff_dlg->DoModal();
delete playoff_dlg;
|
|
|
|
|
The problem you have is that you are setting the m_pMainWin to be a pointer to your first dialog.
MFC automatically terminates the thread (your application) when the window that m_pMainWnd is pointing to is closed. For further information see MSDN.
You could change the code to:
dlg = new CPoolDlg;
playoff_dlg = new CPlayoffDlg;
m_pMainWnd = playoff_dlg;
int nResponse = dlg->DoModal();
delete dlg;
nResponse = playoff_dlg->DoModal();
delete playoff_dlg;
Which will ensure that the application lives for the duration of the second dialog.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Thank you both guys, it works now
|
|
|
|
|
How should we create 3 Dimensional Graph(Pipe) in VC++ Using MFC?
For example if we give pipe length, breadth, radious How should we draw 3D Pipe?
K.V.K.Naidu
|
|
|
|
|
Hello!
Within a C++ program I need to get the disk quota for all users on a window-machine. I found the IDiskQuotaControl interface, which seems to be the right tool for this task, but I'm not sure how to use it properly (there are no examples in the msdn). Can anyone help me with this?
Thank you very much,
Markus
|
|
|
|
|
std7702 wrote:
I found the IDiskQuotaControl interface...but I'm not sure how to use it properly (there are no examples in the msdn). Can anyone help me with this?
How about:
HRESULT hr;
IDiskQuotaControl *pIDiskQuotaControl;
hr = CoInitialize(NULL);
if (SUCCEEDED(hr))
{
hr = CoCreateInstance(CLSID_DiskQuotaControl, NULL, CLSCTX_INPROC_SERVER, IID_IDiskQuotaControl, (void **) &pIDiskQuotaControl);
if (SUCCEEDED(hr))
{
...
pIDiskQuotaControl->Release();
}
CoUninitialize();
}
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
This looks good, thank you!
|
|
|
|
|
I am using a modeless dialog box with activex controls. If I remove the activex controls then it is working correctly otherwise it is giving assertion failure error
At the line containing dialogboxname.ShowWindow() function.
Tell me what is wrong.
babu
|
|
|
|
|
If the code is no too long, post the .h and .cpp files from your dialog class. This can help us a lot
|
|
|
|