|
Hi,
How to convert XML, formatted with XSLT, to PDF ?
Any information would be highly appreciated.
Regards,
Paresh.
|
|
|
|
|
[Insert stuff here] can be converted to PDF if [insert stuff here] can be printed. You can do it with Lib haru[^] if you are doing native programming and with iTextSharp[^] if you are writing managed code.
If you are printing it manually, then you could use one of those virtual PDF printers.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Thanks Rajesh. I will look into the libs.
Regards,
Paresh.
|
|
|
|
|
Hi,
I want to keep my software settings in XML file.
Is this possible in vc++ to save and read settings from a XML file?
|
|
|
|
|
yes. here[^]
more seriously, there are plenty of libraries out there.
if you search on Codeproject, you'll find some.
but the best XML libs are certainly TinyXML and MSXML... google for them.
|
|
|
|
|
|
I took a dialog class and using insert active X control i placed a pie chart in it. using toolbar i placed 4 edit boxes. all i want is when ever i place values in those edit boxes the pie graph should change dynamically. please send me the code for it. i'm using VC 7.1 version(.Net 2003)
|
|
|
|
|
Well, you can add handlers for EN_CHANGE messages from those edit boxes. Read the new number from them, then do whatever you have to do to alter your pie chart.
I imagine you have a m_pPieChart (for example) variable, so something like m_pPieChart->UpdateSegment (2, nNewNumber); to update the 3rd (assuming 0 based) segment.
I have no idea about what pie chart activex control you used, so that's very handwavy help.
Good luck,
Iain.
|
|
|
|
|
hi @ all,
i want to encode recorded sound by media lib(winapi) in PCM Format to the g711 uLaw codec.
Anyone here who knows how to do this correctly? All methods to encode i´ve found expect an
integer value but the WAVEHDR structure hold the recorded data in LPSTR.
How can I convert this correctly?
Greetings Crazydogg
|
|
|
|
|
Do you intend to use _itoa:Convert an integer to a string.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think you mean atoi but
it´s a way to try but if it works is the other questions.
|
|
|
|
|
No this is not working. The integer will be 0 after using atoi.
|
|
|
|
|
There's 2 issues here. One is the encoding PCM vs uLaw and the other is the file format, headers, footers, record structure etc. It's a few years since I did this but I suggest you code a reader and a writer for each file format and ensure that you can successfully read and write example files of each type, with noise in is fine as long as the noise is the same after you've read it in and written it out again. Then you need to look into the encoding side and work out how to get the audio information translated from one encoding to the other or to an acceptable common encoding for an existing codecs.
The biggest issue with this stuff is likely to be time efficient buffer management. Just remember that calling new and delete is very expensive.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
That´s all done but the methods for encoding are available and I just want to know how to give the recorded sound to this methods.
How do you mean to look in the encoding side. I´m just a beginner in sampling and encodign sound. Do you have any Code Snippets or a good tutorial?
|
|
|
|
|
CrazyDogg wrote: I just want to know how to give the recorded sound to this methods.
Usually you just pass a buffer of Bytes possibly a whole number of longs i.e. length a multiple of 4 but it's usually best to think of it as just a black box buffer of bytes.
CrazyDogg wrote: Do you have any Code Snippets or a good tutorial?
Sadly no, it was part of my previous job, neary 4 years ago.
All you should need to know is the encoding in which the method expects it input data and the prototype of the function you're calling. What does it look like?
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
The prototype looks like unsigned char* linear2uLaw(int buf);
|
|
|
|
|
I'm gussing that's old style C and the int they expect is the address of the buffer. Assuming your buffer is a char array you probably need something like
<br />
char existingBuffer[ LARGE_SIZE ];<br />
char* pNewBuffer = linear2uLaw( reinterpret_cast< int >( &( existingBuffer[0] ) ) );<br />
That assumes that the call allocates a new buffer with the converted data. If it does it in-place then pNewBuffer will end up == to &existingBuffer;
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Oh Im Sorry the return parameter is not unsigned char* it is unsigned char
|
|
|
|
|
I'm guessing the conversion is in place then, i.e. the buffer you pass will be modified and the return will either be an error code or something like the number of bytesin the coverted buffer. You really need some docs on what you're calling to be sure.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Hi Masters!
--------------
As you probably know, messages sent to a thread using PostThreadMessage() aren't associated with a window, that's
hWnd member of MSG structure is set to NULL.
On the other hand, TranslateMessage() fails in the case of
encountering NULL as hWnd member of message sent to it!
Now, how can I Translate messages recieved by a thread that has
no windows in it?
Thank you masters!
|
|
|
|
|
How many times has it been suggested to you to create a hidden window?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Are you angry Mark?
|
|
|
|
|
Nah....just asking
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I now Mark BTW I didnt see you on the codeproject,I think previously you was more active here,right?
|
|
|
|
|
I'm here every day
Activity on the boards has seemed pretty slow.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|