Re: TComboBox->AddObject.... how to add two strings?


2007-09-23 10:14:17 PM
cppbuilder109
Hi Mark
In article < XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says...
Quote
Thanks for all the suggestions, I got all them working, just don't know
which is the most efficient in terms of speed and memory.
"MarkR" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>I have a requirement where I need to add two Strings to a TComboBox
Just test each in a loop and mesure the time:
DWORD TimeStart = GetTickCount();
Your Loop
DWORD TimeEnd = GetTickCount();
Label1->Caption = String((int)(TimeEnd-TimeStart));
The THolder class could use les memory if it isn't
derived from TObject, but then You need to cast the
pointer when You add it also. Something like:
(TObject*)(new THolder("YourString")) !!Not Tested!!
To JD: Have You testet the prvious code ???
Kind regards
Asger