Tony M12529

Member since: Wednesday, 29 June 2016
Last login: 6 months ago
Profile viewed: 263 views

No Rank
Points: 0

Tony M12529 replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. less than a minute ago

Hi Tony,
I had another memory flash: This year's code rage series of webinars had
Al Mannarino - Migrating your C++Builder Projects to Unicode
This is now on youtube:
https://www.youtube.com/watch?v=H-KFq5M0z0A
Regards, Roger

"Above and beyond the call ..." heartfelt thanks once again.
Cheers

Read More...

Tony M12529 replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. 1 year ago

Hi Tony,
strcat is now simply the '+' operator : String MyNewString = OldString1 + OldString2;
strcpy is now simply the '=' operator : String MyNextNewString = MyNewString;
Regards, Roger
Makes sense. Pity there's no 'See also' link on the online help files for this.
Finally getting my 'ducks in a row'. You've been of tremendous help! Thanks for your time and effort to reply.

Read More...

Tony M12529 replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. 1 year ago

Thanks once again Roger. Just what I needed. No idea why this link didn't come up in my searches. Perhaps I was being too specific quoting C++ Builder XE.
Anyway, have already printed out the Migrating C++ pages to read through.

Read More...

Tony M12529 replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. 1 year ago

Thanks so much Roger for your reply. I've been pulling my hair out for the last few weeks on this one. Wish I had asked the question earlier. Going through web searches leads many dead ends.
There's tons of Char arrays and a few AnsiStrings around in the code (Main is 13,000 lines alone).
What I've been (slowly) doing is converting the Char arrays to wchar_t and ANSI Strings to Unicode Strings and the functions like strcat, strcpy etc to their wcs alternatives. Funny thing is though that there seems to be no Unicode string equivalents to these functions. Was that ever rectified in C++ Builder versions after XE1? Or am I missing something here?
Then one comes across functions like GetCurrentDir which requires a Unicode string in XE.
It's only when you run into problems later on that one's poor choices become apparent. I'd started by converting Char types to Unistrings but this has proven to be a headache. Hope I'm going in the right direction rather using wchar_t to replace char arrays?
Pity Embarcadero didn't provide a converter when they changed over from Borland C++ to Builder.
Anyway, I'm learning :-)
Cheers and thanks again.

Read More...

Tony M12529 created a new topic ' Convert older C++ Builder source with Builder C++' in the forum. 1 year ago

I've been given the source for an old C++ program (presumably written with Borland C++) to update. However I'm having numerous problems with the conversion, particularly with char/strings.
I've set the Project/options/directory and conditionals _Tchar Maps to: Char
but still end up with errors such as:
[BCC32 Error] ModDispField.cpp(21): E2034 Cannot convert 'char[3000]' to 'wchar_t *'
for example:
Memo1->SetTextBuf(m_DF); where M_DF is defined in a global header as extern char m_DF[3000];
I normally use Delphi (currently on Tokyo) so C++ is pretty much an unknown quantity to me (haven't looked at it since I bought XE studio).
I've tried enabling 'Backward Compatibility', Enable all compatibility options' and 'non-constant string literals' without success.
The aim is simply to get the C++ source to compile so I can step through the logic and then re-write in Pascal.
Any help would be appreciated. I've searched the web but most information seems to be related to converting Borland C++ to Visual C++.
Is there a 'step by step' guide for conversion available anywhere?

Read More...

Tony M12529 created a new topic ' TMediaPlayer recording' in the forum. 1 year ago

My first venture into multimedia.
I've set up a project that uses TMediaPlayer to record from a microphone and save as 'Trial.Wav' which works OK as is.
1. With TMediaPlayer is the sound recorded buffered then subsequently saved as a wav file or is it streamed directly to disk?
2. If buffered how do I locate the buffer? (Reason I need to further process the wav data in real time).
3. Final part is displaying the data on screen (like an oscilloscope), vary input volume etc.
Is this possible with TMediaPlayer or do I need to revert directly to the Windows API?
If the later, any suggested resources in finding the required information to accomplish my tasks? Even if I have to purchase a Windows programming book that covers these topics is OK (although I'd prefer online documentation). I've looked through the Microsoft site and find it very difficult to navigate their structures.

Thanks in anticipation.

Read More...