|
First call GetDriveTypeInfo and then GetDriveVolumeInfo. The latter will return data such as volume serial number, total disk space and free disk space
Cheers,
Tom Archer - Visual C++ MVP
Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
|
Hi All,
I have a template class CustomList derived from MFC CList<ARG, ARG_TYPE> so that I can customize the serialization of the class
In .h file
// -------
template<typename T>
class CustomList : public CList<T,T>
{
DECLARE_SERIAL(CustomList)
public:
CustomList(): CList<T, T>()
{
}
virtual void Serialize(CArchive& ar);
};
In .cpp file
if I write
IMPLEMENT_SERIAL(CustomList, CList, 1)
I get a compiler error saying use of class template requires template argument list.
My question is how do I write IMPLEMENT_SERIAL macro so that my class is compiled correctly
Thanks
|
|
|
|
|
psychedelic_fur wrote:
My question is how do I write IMPLEMENT_SERIAL macro so that my class is compiled correctly
Have a Look At Mr. Ravi Serialize Series :-
http://www.codeproject.com/cpp/serialization_primer3.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
psychedelic_fur wrote:
In .cpp file
if I write
IMPLEMENT_SERIAL(CustomList, CList, 1)
I guess, there is no .cpp file for template class. It should all be in the .h file itself.
suhredayan There is no spoon.
|
|
|
|
|
Hi to you,
I'm looking for a way to stream audio-outputs over a local net. So first I have to program a server, which listen the wav-output and secound I have to make a client which access data from the server using ftp. At the end, I can hear the same music over several floors using wlan. Could everone help me to realise this?
Thank you!
Meinhard
|
|
|
|
|
|
You canuse WaveOut And WaveIn API,s for in/out Audio.
UDP is The the suitable WAy to transfer Voice DAta,
You Must Use RTP_Real Time Protocol To Syncronize Source
and Destination,
This is Simply Works!!!!
|
|
|
|
|
Synchronization does not make sense here, because it can't be synchron (network delay!) and you only have one stream.
Don't try it, just do it!
|
|
|
|
|
FTP is a file transfer protocol, you can not use it for streaming!
Either use TCP (which is easier to handle) or UDP!
The way the whole thing works is quite easy.
You can either send uncompressed data (WLan should be fast enough) or better use compressed data if you have many streaming clients or the connection is too slow.
For that case I personally wouldn't use RTP because it is difficult to implement if you don't want to use the live library or any other RTP library.
Since WLan normally is a reliable network I propose you use TCP.
Before streaming transmit the settings of the data to the client (sampling rate, bits per sample, ...).
The streaming is easy then:
-create a directsound buffer (should be big to prevent lags!)
-decompress (if compressed)
-load the data in a (big) directsound buffer.
-after the buffer gets full the first time, you should run it.
Don't try it, just do it!
|
|
|
|
|
How to hide a modal dialog as soon as Domodal()?
To invoke ShowWindow(SW_HIDE)in OnInitDialog() has no effect.
I love you not for whom you are, but who i am when I'm by your side
|
|
|
|
|
|
thank you very much.i have get the way to resolve the problem.
I love you not for whom you are, but who i am when I'm by your side
|
|
|
|
|
gohappy_1999 wrote:
thank you very much
My pleasure
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Why would anyone want to hide a modal dialogbox? A modal dialogbox remains the active window, until it is closed (for a given application). If you need to hide it for some reason, then it should be modeless.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
John R. Shaw wrote:
Why would anyone want to hide a modal dialogbox?
May be he Want to make Invisible Dialog Based Application.
John R. Shaw wrote:
A modal dialogbox remains the active window, until it is closed (for a given application).
Yeap, You are Right.
John R. Shaw wrote:
If you need to hide it for some reason, then it should be modeless.
May Be, But Modeless Dialog Box application need a parent application to run it, So better idea would be to make Hidden Dialog Box application.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hello everybody!
I am using VS .NET 2003, trying to use axWebBrowser COM.When I draged and droped the axWebBrowser control from tool box to my windows form it added the references for SHDocVw and AxSHDocVw also. I compiled it, it compiled fine but when I ran my program it gave me a run time error:
An unhandled exception of type 'System.ExecutionEngineException' occurred in axinterop.shdocvw.dll
just to be on the safe side I have added "using namespace System::Runtime::InteropServices;" in my form's .h file but still I am getting the same error. For axWebBrowser I have wrote only this code:
1 String* url = S"c:\Test.XML";
2 axWebBrowser1->Navigate(url,0,0,0,0);
All I want to do is to display a .XML file in browser control which I did in my MFC application with the same control and with the same way as I have mentioned above.
Please help me!!!!!!
osAma
|
|
|
|
|
Hi all!
I have a problem with Visual Studio.Net to create Setup Package. My Setup Package requires a skin, so the form (For example: Welcome form, Licence Form, Progress Form) can not be nomal. Please tell me to stick the skin on the form.
Thank you very much
|
|
|
|
|
I found a special phenomena when I analyse the NTFS structure: the data in offset 0x1fe of some sectors was changed, so I cannot do something because the data is illegal. Why?,what can I do?
|
|
|
|
|
NOTE: I posted this on the 26th and received a great response in the form of e-mails from potential testers. However, I need roughly 4 more. The Developer Test Release comes with full documentation and source code, and weighs in at 68 Kilobytes (zipped).
I'm looking for any C++ developers interested in testing a new XML library focusing on a simplistic public interface. Developers of almost any skill are welcome to submit a request. Either e-mail me directly or leave a message along with your e-mail address in this topic. A lot of people have expressed a great interest in the project, and I along with them, believe it'll create a massive impact in the world of Open Source.
Just send the e-mails to skonen@gmail.com . Anybody who is interested in giving it a try needs to be proficient in English and have no fear with expressing their opinions.
|
|
|
|
|
If it will work on Windows CE 3.0, we definitely could use it!
Tom Archer
Visual C++ MVP
|
|
|
|
|
I'll give it a try.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Me Too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
For some reason, I can't send you e-mails, so I'll put my comments down here.
<br />
XML Dev<br />
-------<br />
<br />
Comments...<br />
<br />
- make the DevNotice.txt file wrap to ~80 columns<br />
<br />
[LoadDocument]<br />
<br />
- doesn't support the necessary character encodings:<br />
See http://www.w3.org/TR/2004/REC-xml-20040204/#charencoding for info<br />
<br />
- doesn't detect the appropriate file encoding:<br />
http:
<br />
- at a minimum, you should be able to load all of the sample files on<br />
this page:<br />
http:
<br />
- since you're trying to make this OS independant, you could use:<br />
http://www.unicode.org/Public/PROGRAMS/CVTUTF/ for your conversion code<br />
between utf-8/utf-16.<br />
<br />
[Other Stuff]<br />
<br />
Bug: Failure to check for empty/all spaces/invalid tag/attribute names.<br />
It's a problem with SetAttribute, AddChild, etc. <br />
<br />
i.e. pRoot->SetAttribute(_T(""), _T("a")); is allowed.<br />
pRoot->AddChild(_T(" ")) is allowed.<br />
<br />
- how do you set the XML declaration? (i.e. <?xml version="1.0" encoding="utf-8"?> )<br />
<br />
- I question the use of the text mappings. What's important is that you can<br />
handle reading Unicode files in an ANSI build, and vice versa. I would just<br />
store all the XML data using wchar_t/std::wstring. utf-8 files could be<br />
converted to ucs-2, and passed to the XML object. utf-16 files could be<br />
passed directly to the XML object.<br />
<br />
- Usage seems fairly logical and simple from the stuff I tried<br />
<br />
- Help file layout is very good. The only thing I don't like is lack of<br />
padding on the top and bottom of text in the gray boxes<br />
<br />
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
I would like to give it a try
|
|
|
|